Posts

Showing posts with the label Android Textinputlayout

Change TextInputEditText Hint Color

Answer : The fix for me was to set the hint and the textColor on TextInputLayout, rather than on TextInputEditText as described here: https://material.io/develop/android/components/text-input-layout/ <android.support.design.widget.TextInputLayout android:id="@+id/passwordTextInputLayout" android:hint="@string/add_nitrogen_template_name_label" android:textColorHint="@color/warm_grey"> <android.support.design.widget.TextInputEditText android:textAppearance="@style/TextAppearance.Regular" android:textColor="@color/white"/> </android.support.design.widget.TextInputLayout> have you tried also these attributes for your AppTheme ? <item name="colorControlNormal">@color/primary</item> <item name="colorControlHighlight">@color/warm_grey</item> <item name="colorControlActivated">@color/warm_g...

Android.support.design.widget.TextInputLayout Could Not Be Instantiated

Answer : replace android.support.design.widget.TextInputLayout with com.google.android.material.textfield.TextInputLayout If you uses AndroidStudio, you should not include android-support-design.jar. Instead, write like below in your build.gradle: dependencies { ... compile 'com.android.support:design:24.0.0' ... } Edit : If this doesn't work you are probably using a different version. In Windows, go to: [android-sdk]\extras\android\m2repository\com\android\support\design On Mac: sdk/extras/android/m2repository/com/android/support/design This directory holds a number of version folders. Use the latest version on your build.gradle. add in the build.gradle following this line: implementation 'com.android.support:design:28.0.0' and use in the xml file: <com.google.android.material.textfield.TextInputLayout android:id="@+id/inputLayoutMobile" android:layout_width="ma...