小编Muh*_*ana的帖子

如何将Datagridview中的格式列更改为此值的日期类型

例如,我有这样的值:

41607.2069444444; 41607.2068402778; 41607.2072222222;
Run Code Online (Sandbox Code Playgroud)

这是从CDR计算dateTimeOrigination,在excel中我将格式单元格更改为类型日期,其工作是11/29/2013 4:58:42 AM.我的问题是如何在VB.net的datagridview中格式化这个值?

vb.net datagridviewcolumn

6
推荐指数
1
解决办法
3万
查看次数

如何更改起点drawrect customview android

我想按进度绘制自定义绘制矩形,如下图所示:

画矩形

但是,我的问题是将左上角的起点更改为中上,到目前为止,这是我的自定义视图:

public class RoundProgress extends View {
Path path = new Path();
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
float length;
float[] intervals = {0, 0};

public RoundProgress(Context context) {
    super(context);
    paint.setColor(Color.BLUE);
    paint.setStyle(Paint.Style.STROKE);
    paint.setStrokeWidth(100);
}

@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
    path.reset();
    RectF rect = new RectF(0, 0, w, h);
    float inset = paint.getStrokeWidth();
    rect.inset(inset, inset);

    path.addRoundRect(rect, 100, 100, Path.Direction.CCW);
    length = new PathMeasure(path, false).getLength();
    intervals[0] = intervals[1] = length;
    PathEffect effect = new DashPathEffect(intervals, …
Run Code Online (Sandbox Code Playgroud)

android android-custom-view

5
推荐指数
1
解决办法
500
查看次数

如何在底部布局android中设置按钮

我有一个寄存器布局,我想总是在底部设置按钮,但是当我单击其中一个文本字段时,按钮不在最后一个元素/文本字段下,而是在文本字段之上.我打算让它相对,如果键盘没有出现,它会出现在图片中,文本字段和按钮之间有一个空格,但是当键盘出现时,我打算消除空间.

此搜索 图像2

这是我的布局xml:

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:id="@+id/login_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <include layout="@layout/padding" />

        <EditText
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:layout_marginTop="20dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="textEmailAddress"
            android:ems="10"
            android:id="@+id/editText"
            android:layout_gravity="center_horizontal"
            android:hint="Email Address"/>

        <EditText
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:layout_marginTop="20dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="textPassword"
            android:ems="10"
            android:id="@+id/editText2"
            android:layout_gravity="center_horizontal"
            android:hint="Password"/>

        <EditText
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:layout_marginTop="20dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="text"
            android:ems="10"
            android:id="@+id/editText3"
            android:layout_gravity="center_horizontal"
            android:hint="First Name"/>

        <EditText
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:layout_marginTop="20dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="text"
            android:ems="10"
            android:id="@+id/editText4"
            android:layout_gravity="center_horizontal"
            android:hint="Last Name"/>

        <EditText
            android:layout_marginLeft="20dp"
            android:layout_marginRight="20dp"
            android:layout_marginTop="20dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="phone"
            android:ems="10"
            android:id="@+id/editText5"
            android:layout_gravity="center_horizontal"
            android:hint="Phone"/>

    </LinearLayout>

    <TextView
        android:id="@+id/forgottext"
        android:layout_below="@+id/login_layout"
        android:layout_marginRight="20dp"
        android:layout_marginTop="20dp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Forgot?" …
Run Code Online (Sandbox Code Playgroud)

android android-layout

3
推荐指数
1
解决办法
4581
查看次数

如何改变缩小并改变动作栏中的颜色

我想在操作栏中更改颜色并更改后面的窄图标.它的工作当我只是改变后面的狭窄,但当我在动作栏中设置颜色时,图标就消失了.我想将动作栏的颜色更改为蓝色.

这是我在xml中的代码:

<?xml version="1.0" encoding="utf-8"?>
Run Code Online (Sandbox Code Playgroud)

<!--
    Base application theme, dependent on API level. This theme is replaced
    by AppBaseTheme from res/values-vXX/styles.xml on newer devices.


-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
    <!--
        Theme customizations available in newer API levels can go in
        res/values-vXX/styles.xml, while customizations related to
        backward-compatibility can go here.

    -->
</style>

<style name="AppBaseAlternativeTheme" parent="android:Theme.Holo.Light">
    <item name="android:actionBarStyle">@style/MyActionBar</item>
</style>

<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
    <!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>

<style …
Run Code Online (Sandbox Code Playgroud)

android styling android-actionbar

2
推荐指数
1
解决办法
1696
查看次数

部署到工件后不包括外部依赖

我开发了小型 mvp 库,其中包含一些依赖项,例如 butterknife 和 glide,但是在它已经部署到我的私有工件之后,我的库中不包含所有依赖项,因此在使用此库时,我的项目中未解决所有依赖项。我是这个神器的新手,我错过了什么吗?

这是我的根 build.gradle :

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.2.3'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.0.1"
    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
   }
}

allprojects {
  repositories {
    jcenter()
  }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)

这是我的 build.gradle 模块:

apply plugin: 'com.android.library'
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'maven-publish'
apply plugin: 'me.tatarka.retrolambda'

def libraryGroupId = 'com.pixilapps.pixilframework'
def libraryArtifactId = 'mvp' …
Run Code Online (Sandbox Code Playgroud)

android artifactory android-library

1
推荐指数
1
解决办法
1221
查看次数