Questions tagged [android-textinputlayout]

Layout which wraps an EditText (or descendant) to show a floating label when the hint is hidden due to the user inputting text.

Layout which wraps an EditText (or descendant) to show a floating label when the hint is hidden due to the user inputting text. Also supports showing an error via setErrorEnabled(boolean) and setError(CharSequence).

887 questions
8
votes
1 answer

Can you add a textview or something similar as a child to a textinputlayout?

I have an application that uses a lot of textinputlayouts because I like the style they create on one screen I am showing info on one object and I want it too look like the data the user entered with the textinputedittexts , small caption above and…
Cruces
  • 3,029
  • 1
  • 26
  • 55
8
votes
6 answers

TextInputLayout Hint doesn't float up after updating Google Support Library

I recently updated my support library to com.android.support:appcompat-v7:25.1.0 after which if I add a text to EditText via xml file the TextInputLayout hint doesn't float up. I also had a look at this question but it didn't worked for me. Here is…
Rahul Sharma
  • 2,867
  • 2
  • 27
  • 40
8
votes
3 answers

TextInputLayout error text padding

I am using TextInputLayout with AppCompatEditText having a custom xml shape based background for AppCompatEditText. Whenever i set some error , the error line starts from beginning of layout. Is there any way to give padding to that error line.
8
votes
7 answers

How to make error message in TextInputLayout appear in center

Currently it looks as in attached with this layout:
cgr
  • 4,578
  • 2
  • 28
  • 52
8
votes
0 answers

how to achieve TextInputLayout animation on typing first character rather than on gaining focus?

TextInputLayout shows animation of hint converting into label on gaining focus. I want this animation when the user types first character.
mak
  • 141
  • 6
7
votes
1 answer

Setting on click listener to TextInputEditText drawable Right/End android studio

I am having a Text Input Layout with Text Input Edit Text inside. The Text Input Edit Text has a Drawable at the end. What i want to achieve is make the drawable at the end do something when it is clicked for example show a Toast message Below is my…
7
votes
3 answers

How to set TextInputLayout's outlined box floating hint background color

How to change the background color of the floating hint in a text input layout outline box style to transparent. I think the attached picture clearly states the issue It should be red above the stroke and white below). What I did to change the…
7
votes
1 answer

TextInputLayout Crashing when setting Custom Theme for App

Following code worked perfectly with outline input box.
Abish R
  • 1,537
  • 3
  • 18
  • 36
7
votes
2 answers

How to customize TextInputLayout when using a Material Design Theme?

I want to customize TextInputLayout's error text color. My app theme is based on one of the MaterialComponents themes namely Theme.MaterialComponents.Light.DarkActionBar. I have created a custom text style based on TextAppearance.Design.Error, and…
7
votes
4 answers

Android EditText error message popup text not showing

I'm having an issue in my app where the error popup on EditTexts shows but the text is not visible. It looks something like this: This happens with all the EditTexts in my app. Here's an example layout XML Layout:
7
votes
3 answers

Float Label hint (TextInputLayout) not works with Android Data Binding

I need create fields edit page in app. There are list of EditText for edit Contact. For each field type i have an layout. As example - for name and last name it is float labeled edit text. For facebook - simple edit text with icon. I am creating…
7
votes
3 answers

TextInputLayout - Change floating label hint color if EditText is not empty and not focused

Res state - hint color black, good Focused state, empty - hint color gray, good Focused state, not empty - hint color gray, good Res state, not empty - hint color black, not good, should be gray How to change hint color if editText is not empty…
RexHunt
  • 192
  • 3
  • 16
7
votes
2 answers

TextInputLayout Not Working Properly in ConstraintLayout

I am new to ConstraintLayout. I have tried to set the TextInputLayout width to match parent but it's always jump to 365dp. And i can't able to align the TextInputLayout in bottom of another. Please help me with this issue . Screenshot
6
votes
3 answers

Exposed Dropdown Menu not showing items

Exposed Dropdown Menu doesn't show items after user selection and fragment transition. Following is the basic xml declaration:
6
votes
4 answers

Remove floating label hint text in TextInputLayout

Is there any way to remove floating label (hint) when the user clicks on the text field? When I click on the text field, the hint just automatically moves above the editText but it does not disappear. I want the hint to disappear whenever the user…