Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/226.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android TextInputLayout浮动标签显示缓慢_Android_Android Layout - Fatal编程技术网

Android TextInputLayout浮动标签显示缓慢

Android TextInputLayout浮动标签显示缓慢,android,android-layout,Android,Android Layout,我已经应用了安卓TextInputLayout,它工作得很好。但是当出现文本输入布局时,编辑文本变得非常慢。以及我已经改变了提示颜色,但它不工作 布局xml: <android.support.design.widget.TextInputLayout android:id="@+id/register_input_layout_password" android:layout_width="match_parent"

我已经应用了安卓
TextInputLayout
,它工作得很好。但是当出现文本输入布局时,编辑文本变得非常慢。以及我已经改变了提示颜色,但它不工作

布局xml

 <android.support.design.widget.TextInputLayout
                android:id="@+id/register_input_layout_password"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
            <EditText
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:maxLength="15"
                android:lines="1"
                android:id="@+id/Register_fragment_passwo_field"
                android:hint="Password"
                android:layout_gravity="center_vertical"
                android:paddingLeft="35dp"
                android:textColor="#ffffff"
                android:textColorHint="@android:color/white"
                android:layout_marginTop="5dp" />
            </android.support.design.widget.TextInputLayout>


依赖关系
编译'com.android.support:design:23.0.1'
设置TextInputLayout
android:textColorHint=“@android:color/white”
的此属性以更改提示颜色,我可以查看您的代码以查找为什么文本变得非常慢

<android.support.design.widget.TextInputLayout
                    android:id="@+id/register_input_layout_password"
                    android:layout_width="match_parent"
                    android:textColorHint="@android:color/white"
                    android:layout_height="wrap_content">
                <EditText
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLength="15"
                    android:lines="1"
                    android:id="@+id/Register_fragment_passwo_field"
                    android:hint="Password"
                    android:layout_gravity="center_vertical"
                    android:paddingLeft="35dp"
                    android:textColor="#ffffff"
                    android:textColorHint="@android:color/white"
                    android:layout_marginTop="5dp" />
                </android.support.design.widget.TextInputLayout>


您是如何更改提示颜色的?此链接将帮助您“
   <!-- if You Can Change Color of TextInputLayout Like this-->
    <style name="TextLabel" parent="TextAppearance.AppCompat">
        <!-- Hint color and label color in FALSE state -->
        <item name="android:textColorHint">@color/Color Name</item> 
        <item name="android:textSize">20sp</item>
        <!-- Label color in TRUE state and bar color FALSE and TRUE State -->
        <item name="colorAccent">@color/Color Name</item>
        <item name="colorControlNormal">@color/Color Name</item>
        <item name="colorControlActivated">@color/Color Name</item>
     </style>
public class FloatingEditText extends FrameLayout{

      animation = new AnimatorSet();
      ObjectAnimator move =
          ObjectAnimator.ofFloat(mHintTextView, "translationY", mHintTextView.getHeight() / 8, 0);
      ObjectAnimator fade;
      if (mEditText.isFocused()) {
        fade = ObjectAnimator.ofFloat(mHintTextView, "alpha", 0, 1);
      } else {
        fade = ObjectAnimator.ofFloat(mHintTextView, "alpha", 0, 0.50f);
      }
      animation.playTogether(move, fade);
}
 <android.support.design.widget.TextInputLayout
                android:id="@+id/il_second_phone_number"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="@dimen/view_margin_micro"
                android:textColorHighlight="@color/color_darker_gray"
                android:textColorHint="@color/color_darker_gray">

                <EditText
                    android:id="@+id/et_second_phone_number"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/layout_height_normal"
                    android:backgroundTint="@color/color_darker_gray"
                    android:hint="@string/second_phone_number"
                    android:inputType="phone"
                    android:maxLines="1"
                    android:text="@={vm.cPhoneTwo}"
                    android:textColor="@color/color_black" />
            </android.support.design.widget.TextInputLayout>