android-textinputlayout

Disable/Remove floating label hint text in TextInputLayout XML

六月ゝ 毕业季﹏ 提交于 2020-01-22 04:57:49
问题 This may seem counter-intuitive but is there a way to disable or remove the floating label hint in TextInputLayout ? The reason I want to use TextInputLayout instead of just an EditText is for the counter that TextInputLayout provides. Here is what I have so far: <android.support.design.widget.TextInputLayout android:id="@+id/textContainer" android:layout_width="match_parent" android:layout_height="wrap_content" android:scrollbars="vertical" app:counterEnabled="true" app:counterMaxLength="100

Disable/Remove floating label hint text in TextInputLayout XML

心已入冬 提交于 2020-01-22 04:57:05
问题 This may seem counter-intuitive but is there a way to disable or remove the floating label hint in TextInputLayout ? The reason I want to use TextInputLayout instead of just an EditText is for the counter that TextInputLayout provides. Here is what I have so far: <android.support.design.widget.TextInputLayout android:id="@+id/textContainer" android:layout_width="match_parent" android:layout_height="wrap_content" android:scrollbars="vertical" app:counterEnabled="true" app:counterMaxLength="100

Android Password toggle want to set text instead of image

限于喜欢 提交于 2020-01-17 08:42:10
问题 I am using TextInputEditText as a password field. I want to use password toggle feature available with support library 24.2.0. passwordToggleDrawable allows me to set drawable to change based on toggle state. I want to show TextView instead of drawable to show toggle state i.e. I want show text ' SHOW ' to allow password to be visible and ' HIDE ' when user wants to hide password. I could see property ' passwordToggleContentDescription ' that takes text. I tried to set this property with as '

Error in TextInputLayout dont show again even call setErrorEnabled(true)

柔情痞子 提交于 2020-01-07 07:43:29
问题 I have a TextInputLayout like this <android.support.design.widget.TextInputLayout android:id="@+id/input_layout_name" android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:id="@+id/edt_name" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/title_what_should_we_call_you" /> </android.support.design.widget.TextInputLayout> For valid name when tap on Submit button I use private boolean validateName() { if

How to change hint padding for TextInputLayout when using the new prefixText?

本秂侑毒 提交于 2020-01-04 09:37:34
问题 I have tried implementing TextInputLayout with the new prefixText , using com.google.android.material:material:1.2.0-alpha02 . This is a very cool feature, but when I add a prefix text the hint label floats up and aligns after the prefix. This does not look good, especially if you have more input fields on the same page without prefix, the floating labels does not align. Relevant parts of my layout code: <LinearLayout android:id="@+id/login_input_fields" android:layout_width="match_parent"

TextInputLayout Crashing in Android Lollipop and Above

不羁的心 提交于 2020-01-03 18:54:09
问题 I am using TextInputLayout in one of my app layouts. My app is crashing on user's devices with Lollipop(5.1) version and above. Below is the error android.view.InflateException: Binary XML file line #34: Binary XML file line #2: Error inflating class android.support.design.widget.TextInputLayout arrow_drop_down Caused by android.view.InflateException: Binary XML file line #34: Binary XML file line #2: Error inflating class android.support.design.widget.TextInputLayout arrow_drop_down Caused

TextInputLayout Crashing in Android Lollipop and Above

人盡茶涼 提交于 2020-01-03 18:54:07
问题 I am using TextInputLayout in one of my app layouts. My app is crashing on user's devices with Lollipop(5.1) version and above. Below is the error android.view.InflateException: Binary XML file line #34: Binary XML file line #2: Error inflating class android.support.design.widget.TextInputLayout arrow_drop_down Caused by android.view.InflateException: Binary XML file line #34: Binary XML file line #2: Error inflating class android.support.design.widget.TextInputLayout arrow_drop_down Caused

How do you reduce space between floating editText hint and editText box in Android?

℡╲_俬逩灬. 提交于 2020-01-03 07:19:13
问题 I have an EditText with a floating hint but I was wondering how I would reduce the space between the floating hint and the EditText box. Right now my UI looks like http://imgur.com/9hQzzx4 and I want to reduce the space between the "Title" floating hint and the EditText box. Here's the code to my xml file <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"

Material design Spinner using TextInputLayout.OutlinedBox styling

狂风中的少年 提交于 2020-01-01 14:23:02
问题 I am currently using Material Design TextInputLayout OutlinedBox as shown below: <android.support.design.widget.TextInputLayout style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.design.widget.TextInputEditText android:id="@+id/myEditText" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Title" android:inputType="text"/> </android.support.design

TextInputLayout not showing when View added programmatically

岁酱吖の 提交于 2019-12-30 05:57:09
问题 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