Android设计库25.1.0 TextInputLayout与24.2.1相比,提示无法正常显示

时间:2016-12-26 12:08:26

标签: android android-layout

Android设计库#25.1.0 #TextInputLayout与设计库#24.2.1

相比,提示无法正常显示
  

编译'com.android.support:design:25.1.0'

enter image description here

  

编译'com.android.support:design:24.2.1'

enter image description here

<LinearLayout
        android:layout_centerInParent="true"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/activity_vertical_margin"
        android:orientation="vertical"
        android:paddingBottom="8dp"
        android:paddingTop="8dp">

        <android.support.design.widget.TextInputLayout
            android:id="@+id/login_email_text_input_layout"
            android:layout_width="match_parent"
            app:hintAnimationEnabled="true"
            android:layout_height="wrap_content">

            <android.support.v7.widget.AppCompatEditText
                android:id="@+id/login_email_edit_text"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                app:backgroundTint="@color/colorAccent"
                android:drawablePadding="8dp"
                android:hint="Email"
                android:inputType="textEmailAddress"
                android:lines="1"
                android:maxLines="1"
                android:text="emailaddress@gmail.com" />

        </android.support.design.widget.TextInputLayout>

        <android.support.design.widget.TextInputLayout
            app:hintAnimationEnabled="true"
            android:id="@+id/login_password_text_input_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            app:passwordToggleEnabled="true">

            <android.support.v7.widget.AppCompatEditText
                android:id="@+id/login_password_edit_text"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:drawablePadding="8dp"
                android:hint="Password"
                android:imeActionId="@+id/login"
                android:imeOptions="actionUnspecified"
                android:inputType="textPassword"
                android:maxLines="1"
                android:text="password" />

        </android.support.design.widget.TextInputLayout>

        <android.support.v7.widget.AppCompatButton
            android:id="@+id/login_button"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="end"
            android:layout_marginTop="8dp"
            android:text="Sign In"/>

    </LinearLayout>

1 个答案:

答案 0 :(得分:2)

看起来它已被选为回归,所以它可能会在下一个版本中修复。目前的建议是回滚到25.0.1。

https://code.google.com/p/android/issues/detail?id=230171