Questions tagged [textinputlayout]

114 questions
77
votes
6 answers
29
votes
5 answers

Keep Textinputlayout hint always top

Would be possible have my hint text always top, as if it were focusable? I tried this:
Aris Guimerá
  • 1,095
  • 1
  • 12
  • 27
16
votes
6 answers

TextInputLayout Error right align

I've an EditText enclosed within a TextInputLayout. I wish to display errors under the EditText, but aligned to the right end of the screen. This is what I currently have: The error is displayed like this: What I want it to look like: My XML is…
Rachit
  • 3,173
  • 3
  • 28
  • 45
15
votes
8 answers

Android TextInputLayout hint overlaps EditText hint

I am facing a weird issue, I have a InputTextLayout and an EditText in it, and I am trying to achieve something like this (shown in image below) (Image from material design guidlines:…
14
votes
3 answers

How to create TextInputLayout with OutlineBox programmatically

I want to create TextInputLayout with Widget.MaterialComponents.TextInputLayout.OutlinedBox style. I tried many ways but couldn't get the required result. Here is my code. TextInputLayout textInputLayout = new…
14
votes
4 answers

Android password visibility toggle not working with support library 25?

I have implemented a TextInputLayout with a password field in the usual way:
Cuculus
  • 166
  • 1
  • 2
  • 10
14
votes
6 answers

AppCompatEditText.getpParent() inside TextInputLayout returns FrameLayout

I am creating simple AppCompatEditText adding OnFocusChangeListener and putting it in the simple TextInputLayout. When AppCompatEditText loosing focus it's content should be validate by isValidParam method. It worked till yesterday, when I used…
13
votes
3 answers

How to get Textinputlayout hint android in multiple lines?

I have tried many options available online but none of them seem to be working. I have used this XML for this purpose.
Vaibhav Jaiswal
  • 131
  • 1
  • 4
11
votes
5 answers

How to consistently set EditText Selected Underline Color Programmatically

I'm trying to build a renderer for Xamarin Forms. The renderer needs to set the EditText underline color to "Active Color" when selected and "Hint Color" when deselected. My initial setup looks something like this. note: here's the path to the full…
Chase Florell
  • 46,378
  • 57
  • 186
  • 376
9
votes
1 answer

Failed to inflate ColorStateList on a TextInputLayout

I'm trying to make a login screen with TextInputLayouts. But I can't get errors to be shown. I'm getting the next error on the LogCat and the errors doesn't appear. E/AppCompatResources: Failed to inflate ColorStateList, leaving it to the…
Víctor Martín
  • 3,352
  • 7
  • 48
  • 94
8
votes
5 answers

Android TextInputLayout is not showing error

I am using EditText with TextInputLayout. This is the code, that I am using to display error. private boolean validateEmail() { String email = inputEmail.getText().toString().trim(); if (email.isEmpty() || !isValidEmail(email)) { …
Anu
  • 1,303
  • 3
  • 23
  • 38
7
votes
2 answers

TextInputLayout hint doesn't get refreshed upon recreate() method call

I'm using TextInputLayout. I set it's hint from string.xml to apply localization. So after changing the language from the drop down I use recreate() method which refreshes the whole activity components with selected language resources but…
Feroz Khan
  • 2,396
  • 5
  • 20
  • 37
7
votes
4 answers

RTL android:hint in TextInputLayout

I have this XML layout:
peyman
  • 143
  • 1
  • 9
7
votes
2 answers

Multiline does not work inside TextInputLayout

Whatever I do, I couldn’t manage to make my EditText multilined inside TextInputLayout (had to add InputLayout for character counter). So when I enter something, it goes horizontally instead of going to a new line after a while. As you know very…
mears
  • 359
  • 4
  • 13
1
2 3 4 5 6 7 8