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
10
votes
1 answer

Has the new Password Visibility Toggle broken existing drawableRight for EditTexts?

EDIT I just tried an EditText without a TextInputLayout and it works as expected. So the problem must be with new changes in the TextInputLayout. I have been using a custom EditText class as child of a TextInputLayout for around a month. When the…
10
votes
5 answers

OnClick in the EditText inside TextInputLayout, inside a RecyclerView

I have a RecyclerView in my Fragment, which is populated with several TextInputLayout. After some research, I have managed to set a onClickListener to the TextInputLayout, and is working BUT The onClick event is only fired when I tap in the hint of…
Fustigador
  • 6,339
  • 12
  • 59
  • 115
10
votes
3 answers

InputTextLayout setError() method in Android not working

I have designed a customised InputTextLayout which contains a custom Edittext.This custom Edittext extends the "AppCompatEdittext". Also my MainActivity extends AppCompatActivity. But still I am not able to show the error messages using…
AndroidMech
  • 1,676
  • 3
  • 20
  • 31
10
votes
2 answers

Android - reduce EditText floating label padding/margin?

Is it possible to have those floating label (Email/Password) to be inside the box. Basically reduce the space in between hint and actual input. I tried padding Top/Bottom. Margin Top/Bottom for editText. But none of them gave the result I am…
Alex
  • 1,052
  • 1
  • 11
  • 22
9
votes
3 answers

Show or Hide text using password toggle

I am doing show or hide password using below code pwdLayout.setEndIconMode(TextInputLayout.END_ICON_PASSWORD_TOGGLE); I am able to achieve show or hide password. But eye icon with cross sign is showing password and without cross sign is hiding…
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
9
votes
1 answer

Issue with alignment using TextInputLayout and Spinner

I'm having an alignment issue with the TextInputLayout and the Spinner, I want the Spinner underline aligned with the EditText underline inside of TextInputLayout. This is what I'm doing:
9
votes
2 answers

android : TextInputLayout hides drawableRight of child EditText

I am always updated with library updates, and this is what it resulted into. In build.gradle(Project:xxx): classpath 'com.android.tools.build:gradle:2.2.0-beta1' In build.gradle(Module:app) compile 'com.android.support:appcompat-v7:24.2.0' compile…
9
votes
1 answer

TextInputLayout not showing error message after clearing

I am using TextInputLayout from com.android.support:design:23.3.0 When I first apply an error it is shown…
J Whitfield
  • 755
  • 11
  • 22
9
votes
4 answers

TextInputLayout label to achor above the left drawable of an EditText

Is it possible to make the TextInputLayout label to show above the left drawable of an EditText perpendicularly when user focuses or types in the EditText. Here is the xml of the EditText:
icaneatclouds
  • 1,170
  • 9
  • 18
9
votes
3 answers

How to disable floating label animation when populating EditText Fields wrapped in TextInputLayout

I would like to be able to have the floating label already in place when I pre-populate the EditText field. When the view loads, the hint is still displayed behind the text before it is animated to the floating label. There doesn't seem to be a…
8
votes
1 answer

Android TextInputLayout and TextInputEditText cursor color problem

I have this problem, after the xxx is the cursor in violet, I want to know the name of that drop cursor, I want to change the color to match my theme. I read many forums and documentation, the only I find was cursorDrawable, but is not that. Please…
8
votes
2 answers

Create Custom class for TextInputLayout

In TextInputLayout I want to add TextInputEditText via Custom class Here is the code for custom class I have created : public class CustomTextInputEditText extends TextInputLayout { private TextInputEditText editText; public…
nikhil lohar
  • 139
  • 3
  • 14
8
votes
3 answers

TextInputLayout throws "The style on this component requires your app theme to be Theme.AppCompat (or a descendant)."

I am using TextInputLayout wrapped around a EditText for a RecyclerView item. I am using style "Theme.AppCompat.Light.NoActionBar". But still I get the error "Caused by: java.lang.IllegalArgumentException: The style on this component requires your…
8
votes
1 answer

How to customize android passwordToggleDrawable

Android support library added TextInputLayout adding several features like floating label and password toggle visisbilty My problem is How to customize passwordVisisbilityDrawable so my own icons for visible and hidden state will be displayed. Also…
Homayoun Behzadian
  • 1,053
  • 9
  • 26