Questions tagged [android-textinputedittext]

308 questions
2
votes
0 answers

ReactEditText.java , Fatal Exception: java.lang.NullPointerException

Fatal Exception: java.lang.NullPointerException Attempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)' on a null object reference I am using…
2
votes
1 answer

pressing software back button will close entire activity while keyboard is visible

I experienced weird bug in my app on some of my screens and I dont know what is causing this (I have multiple screens with same implementation, but its happening only in this one). When I display virtual keyboard on EditText focus and I press back…
2
votes
3 answers

Set width of TextInputEditText to n characters

I'm trying to implement a layout where user will input their phone number. The phone number will be 11 digits. And so I wanted to build a text input field with a fixed width that can accommodate 11 characters. NOTE: I don't want the input field to…
2
votes
1 answer

TextInputLayout crash measure and focus when animating (MotionLayout)

Have MotionLayout, which has many ConstraintLayout inside him, some of the ConstraintLayout has TextInputLayout. 1-when using android studio XML design preview: on starter "ideal/landing" state no error, when I start animating to…
2
votes
1 answer

Change TextInputLayout hint color with error message color

I want to change the hint color to white and keep the color for the error messages red. I have tried all of the possible options but each time the hint color was changed to the color of the error message. This is the code snippet I used for the…
2
votes
1 answer

How to change the cursor color in textinputedittext inside textinputlayout

How to change the cursor color of textinputedittext. I used textcursordrawable but it doesn't work. Thanks in advance
2
votes
1 answer

Get height of outline box in TextInputLayout

What I want : I am building a component that looks like the following, where the height of the + & - buttons need to match the height of the outline of the TextInputLayout. What I tried : There seems to be no public api that lets me get the height…
2
votes
1 answer

How add placeholder on editText empty characters

I have an editText that has a limit of 4 characters I want to add a place holder in all the empty characters Is similar to a password input ○ for empty characters and ● for already taken Examples: Pin is 112 => Result in EditText ●●●○ Pin: 12 =>…
2
votes
3 answers

How to change textinput edittext underline color when unfocused?

I am using android design library's TextinputLayout. But couldn't customize the underline color of EditText inside TextinputLayout. Please help. I tried thises how to change color of TextinputLayout's edittext underline android and those (Material)…
2
votes
2 answers

Make Text Counter Always Stay Visible

Issue: Character Counter Runs Off Screen I am finding it extremely difficult to have a character counter which does not disappear once the input text scrolls over one screen size. This is what I have in the layout xml:
2
votes
1 answer

Material components TextInputEditText margin of bottom line

I have a problem. TextInputLayout has margin or padding with respect to the line. I need the line to be the full…
2
votes
3 answers

inputType = "number|text" not working - Android

I am using inputType = "number|text" inside TextInputEditText when I focus on this, It lets me type number only, It allows to navigate to text keyboard but not letting me type text. Here is the code…
Shishupal Shakya
  • 1,632
  • 2
  • 18
  • 41
2
votes
3 answers

EditText doesnt take value

I have two EditText's, title input and desc input. final EditText naslov_comm = view.findViewById(R.id.naslov_comm); final EditText opis_comm = view.findViewById(R.id.opis_comm); final String inputnaslov =…
Marko Lazarevic
  • 163
  • 1
  • 15
2
votes
1 answer

TextInputEditText needs 2 taps to fire the associated listener

I have a view with some input fields, one of those is a TextInputEditText with a datepicker associated which shows up when the field is selected. The problem is that at the first tap, the TextInputEditText field gets the focus and it is required a…
2
votes
3 answers

inputFilter for TextInputEditText

In my application I have an EditText. This EditText is for currency input, for example: 2.23, 9.99 In other words user can type 2 then . then 23 to this EditText To achieve this behavior of EditText I implemented an InputFilter like in Mussa's…