Questions tagged [android-textinputedittext]

308 questions
50
votes
31 answers

InflateException when using TextInputLayout

I'm trying to use TextInputEditText from Material Design (https://github.com/material-components/material-components-android/blob/master/docs/components/TextInputLayout.md) and I'm getting runtime exception. This's part of run log: E/AndroidRuntime:…
45
votes
15 answers

Remove underline from TextInputEditText

I have an android screen which takes email from the user. Below is the snippet of the code, I want to remove the underline which appears below the text.
33
votes
10 answers

There is always a default background on TextInputLayout in Android

I have TextInputLayout and TextInputEditText like this
13
votes
5 answers

How to get text from material design TextInputLayout correctly?

I want to get a text from the material design's TextInputLayout using a custom end Icon. I tried to do that: TextInputLayout textInputCustomEndIcon = findViewById(R.id.editText); final TextInputEditText editText = new…
12
votes
3 answers

Get parent texInputlayout from child textInputEditText

I am implementing a functionality to change the case of textInputlayout Hint text to upper case when the hint floats up and vice versa. For that I am using OnFocusChangeListener on its child textInputEditText. To make it easy to implement I am…
12
votes
6 answers

Android TextInputLayout Password toggle not visible in new support library

I have compiled with following design library and it is displaying password HIDE/SHOW button at the right of EditText compile 'com.android.support:design:24.2.1'
10
votes
2 answers

TextInputLayout move the hint label and change it's background color when focused

I am trying to customize materials TextInpuLayout.OutlinedBox and TextInputEditText. My current state is like following image What I want to do is remove the background of the hint label so that it doesn't create that ugly cutout. Like this: Or…
10
votes
4 answers

Customize Text Input Layout

I want to apply a border to a TextInputLayout as shown in the image. Right now, it looks like this: But, I need it to look like this (i.e. label is placed within border): The code that I have implemented for my EditText is as…
10
votes
3 answers

Password toggle button on TextInputEditText disappears after click in Support Library 25.1.0

I have a TextInputEditText in conjunction with TextInputLayout with android:inputType="textPassword" using app:passwordToggleEnabled="true" to show password toggle button in the TextInputEditText like next image: The problem is once I press the…
10
votes
8 answers

EditText cursor and pointer color for below android 5.0

I am trying to change EditText cursor pointer color (from the primary color blue to white), but no solution is working for my project. I have tried to develop a demo project, where the same code is working fine. This code is working fine for…
Harish Gyanani
  • 1,366
  • 2
  • 22
  • 43
10
votes
4 answers

Use Android Number Keypad but allow negative numbers

I have an EditText field that I would like to only enter negative or positive numbers. When I use InputType.TYPE_NUMBER it will bring up the nice numeric keyboard which is what I want; however it will only let you enter positive numbers even though…
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
2 answers

What difference between textMultiLine and textImeMultiLine in inputType EditText?

I am trying to understand the difference between the textMultiLine and textImeMultiLine options for android:inputType in an EditText. However I have not been able to understand an answer. The documentation says IME is a control enabling users to…
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:
6
votes
1 answer

TextInputLayout hint not working when using databinding

I am using databinding together with the TextInputLayout/TextInputEditText combo as shown in the xml.
1
2 3
20 21