I am always updated with library updates, and this is what it resulted into.
In build.gradle(Project:xxx):
classpath 'com.android.tools.build:gradle:2.2.0-beta1'
In build.gradle(Module:app)
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:design:24.2.0'
And put password field as below:
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.AppCompatEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword" />
</android.support.design.widget.TextInputLayout>
Taadaa...My Password field looks now as below:
You can also go simply with EditText
.
But, there are some glitches in this update.
Problem: If I put any drawableRight in EditText, it displays nothing. TextInputLayout also has property to disable toggle functionality. I did it that too as below, but no success:
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:passwordToggleEnabled="false">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableRight="@drawable/ic_alarm_on_black_24dp"
android:inputType="textPassword" />
</android.support.design.widget.TextInputLayout>
Can anyone help me please.