I am facing a very weird issue after updating my Android Support Libraries, particularly 'com.android.support:design:25.1.0'
. Take a look at the following screenshots:
Note that the same code is working fine for email, country and phone fields but for Name field, the hint "Name" is also visible behind the user's name.
Following is the code:
Email code:
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.touchd.app.ui.views.FontEditText
android:id="@+id/textEmail"
style="@style/loginEditTextView"
android:layout_alignParentBottom="true"
android:gravity="top|center_horizontal"
android:hint="@string/email_text_view"
android:inputType="textEmailAddress" />
</android.support.design.widget.TextInputLayout>
Programmatically:
mEmail = (EditText) findViewById(R.id.textEmail);
mEmail.setText(userProfile.email);
Name code:
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.touchd.app.ui.views.FontEditText
android:id="@+id/textName"
style="@style/loginEditTextView"
android:hint="@string/name"
android:inputType="textPersonName|textCapWords"
android:text="@string/no_name_specified" />
</android.support.design.widget.TextInputLayout>
Programmatically:
mName = (EditText) findViewById(R.id.textName);
if (userProfile.name != null && userProfile.name.length > 0) {
mName.setText(userProfile.name);
}
Style
<style name="loginEditTextView" parent="android:Widget.EditText">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_centerHorizontal">true</item>
<item name="android:textColor">@color/primary_text_color</item>
<item name="android:textSize">19sp</item>
<item name="android:gravity">center</item>
<item name="android:paddingBottom">10dp</item>
</style>
You can see the code is similar. Can anyone help me out here? Is it a bug in Android Design library or am I doing something stupid?
It's a regression in v25.1.0 of the Support Design library as mentioned in a previous answer. It'll likely be fixed in a future release. Roll back to v25.0.1 for now.
https://code.google.com/p/android/issues/detail?id=230171
EDIT Fixed as of 25.2.0 apparently. Will confirm when I get chance to check.