android-textinputlayout

TextInputLayout not showing when View added programmatically

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 17:59:06
I noticed some strange behaviour of TextInputLayout : When I add the following to my layout: <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/txtFirstName" style="@style/EditTextStyle" android:layout_width="match_parent" android:layout_height="match_parent" android:hint="In layout" android:singleLine="true" /> </android.support.design.widget.TextInputLayout> everything works as expected. When I inflate a similar Layout like: View v = LayoutInflater.from(this).inflate(R.layout.edittext_w

TextInputLayout: RuntimeException - Failed to resolve attribute at index 24

若如初见. 提交于 2019-11-30 17:05:29
I keep on getting this error when I try to setErrorEnabled on my textInputLayout : 03-12 12:29:03.206 5706-5706/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.myapp, PID: 5706 java.lang.RuntimeException: Failed to resolve attribute at index 24 at android.content.res.TypedArray.getColor(TypedArray.java:401) at android.widget.TextView.<init>(TextView.java:696) at android.widget.TextView.<init>(TextView.java:632) at android.widget.TextView.<init>(TextView.java:628) at android.widget.TextView.<init>(TextView.java:624) at android.support.design.widget.TextInputLayout.setErrorEnabled

Error inflating class EditText on creating TextInputLayout on Android 4.4.2:

折月煮酒 提交于 2019-11-30 11:41:47
I using the TextInputLayout UI mechanism in my login page of the application, everything works great except for device that run the 4.4.2 android version on this devices I have an exception. This is my layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content"> <include android:id="@+id/loginInfiLogoRL" layout="@layout/login_infi_logo_layout" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="-3dp" android:layout

android TextInputLayout changes EditText style after setting error to null

蓝咒 提交于 2019-11-30 09:05:11
for the first time I'm using the new Android's widget TextInputLayout, it's very nice but I'm facing some problem using setError method this is my xml <android.support.design.widget.TextInputLayout android:id="@+id/userData_txtNameWrapper" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:textColorHint="@color/light_gray" app:hintTextAppearance="@style/TextAppearence.App.TextInputLayout"> <EditText android:id="@+id/userData_txtName" style="@style/bold_textbox_style" android:layout_width="match_parent" android:layout_height="@dimen

TextInputLayout animation overlaps the text when the text is set programmatically

我与影子孤独终老i 提交于 2019-11-30 05:08:09
I am using TextInputLayout with the design support library 22.2.1 . I set the value of the EditText programmatically, and when the screen appears, I can see that the hint of the TextInputLayout overlaps the text inside, before moving in the floating position. Here a simple layout: <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/editText1" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="hint1" /> </android.support.design.widget.TextInputLayout> In my

TextInputLayout: RuntimeException - Failed to resolve attribute at index 24

你说的曾经没有我的故事 提交于 2019-11-30 00:23:59
问题 I keep on getting this error when I try to setErrorEnabled on my textInputLayout : 03-12 12:29:03.206 5706-5706/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.myapp, PID: 5706 java.lang.RuntimeException: Failed to resolve attribute at index 24 at android.content.res.TypedArray.getColor(TypedArray.java:401) at android.widget.TextView.<init>(TextView.java:696) at android.widget.TextView.<init>(TextView.java:632) at android.widget.TextView.<init>(TextView.java:628) at android.widget

Floating label Spinner?

萝らか妹 提交于 2019-11-29 20:01:12
After using the Android Design Support Library's TextInputLayout to place a floating label above an EditText component, I was wondering if there is a way to add a floating label to the Spinner component (not necessarily using the Design Library). By this, I mean something like a TextView placed above the Spinner (obviously no animations like the TextInputLayout ), but I want the text size, font and colour to match that of the TextInputLayout 's floating label . For example, it would look something like this (see the labels above the Spinner s): As I mentioned before, my main aim is to have a

How to change the size of the EditText hint in TextInputLayout

你说的曾经没有我的故事 提交于 2019-11-29 17:42:25
I'm trying to change the hint size in TextInputLayout , but it's not working as desired. This is what I'd like to achieve: styles.xml <style name="TextLabel" parent="TextAppearance.Design.Hint"> <item name="android:textSize">44sp</item> </style> fragment.xml <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" app:hintTextAppearance="@style/TextLabel" android:hint="Password"> <android.support.design.widget.TextInputEditText android:layout_width="match_parent" android:layout_height="wrap_content" android:textSize="24sp"/> <

Error inflating class EditText on creating TextInputLayout on Android 4.4.2:

我的梦境 提交于 2019-11-29 17:34:29
问题 I using the TextInputLayout UI mechanism in my login page of the application, everything works great except for device that run the 4.4.2 android version on this devices I have an exception. This is my layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content"> <include android:id="@+id/loginInfiLogoRL" layout="@layout/login_infi_logo_layout" android:layout

How to change the floating hint color of TextInputLayout if EditText inside is disabled

痴心易碎 提交于 2019-11-29 11:35:54
I am using EditText with TextInputLayout . I just want to change the floating hint color of TextInputLayout if the EditText is disabled. I tried with selector it is not working. <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_enabled="false" android:textColor="@color/darkGray" /> <item android:state_pressed="false" android:state_focused="false" android:textColor="@color/lightGray"/> </selector> There's one method called setHintTextAppearance(int styleId) in TextInputLayout class. You can use this method to set difference colors to hint text on basis of