Questions tagged [android-edittext]

The EditText is the standard text entry widget in Android apps. If the user needs to enter text into an app, this is the primary way for them to do that.

A EditText is an overlay over TextView that configures itself to be editable. It is the predefined subclass of TextView that includes rich editing capabilities.

enter image description here

More information about the EditText:

12098 questions
4
votes
4 answers

Android dialog and edittext values?

I'm having trouble saving String-values that resides within the edittext. What happens is, the dialog shows, with edittext, an ok and a cancel-button. When the OK button is pushed, what i want to happen is for the bar-variable to get the…
Jens Bergvall
  • 1,617
  • 2
  • 24
  • 54
4
votes
2 answers

Android EditText: Smooth expanding animation when new line is started

I have noticed that Telegram has a smooth animation in their chat EditText when a new line is inserted / started. Below I have two GIFs. The first is Telegram, the second is my app. How can you achieve such an animation effect? I tried to google…
mathematics-and-caffeine
  • 1,664
  • 2
  • 15
  • 19
4
votes
3 answers

How do I make android keyboard display a '.com' button

I have an EditText. My imeOptions attribute for the EditText is actionGo. What do I have to do to make it display a '.com' key?
aamiri
  • 2,420
  • 4
  • 38
  • 58
4
votes
3 answers

Android: showing text in EditText from start

I have an EditText view in my xml file with a certain width. I have forced it to 1 line, so that if the entered text is longer than the width of my edit text, the text does not wrap around by using: android:singleLine="true" However, after entering…
TJ1
  • 7,578
  • 19
  • 76
  • 119
4
votes
2 answers

I want my EditText field to change its color while entering values to it

I have to design an xml file in which the color of the text on the Editfield is grey as the application runs on the emulator.But while entering the values into that field I want the values which will be entered by me,to be black in color.How to do…
Vivek Kalkur
  • 2,200
  • 2
  • 21
  • 40
4
votes
5 answers

Android Thread modify EditText

I am having a problem with modifying EditText in another function started by the thread: Thread thRead = new Thread( new Runnable(){ public void run(){ EditText _txtArea = (EditText) findViewById(R.id.txtArea); …
Mark Manickaraj
  • 1,661
  • 5
  • 28
  • 44
4
votes
1 answer

how to change material TextInputLayout hint color on empty edittext?

I'm trying to change TextInputLayout hint color in case it's edittext empty and not focused but I can't do that, and here is my layout
4
votes
4 answers

How can the on-screen text selection widget be changed?

I noticed that different Android applications have different methods of selecting text. If you click-hold in Browser, there is a close up of the text plus the left and right edges can be dragged to modify the selection. In the Gmail app, a large…
Lawrence Barsanti
  • 31,929
  • 10
  • 46
  • 68
4
votes
1 answer

How to retrieve value from EditText in AlertDialog?

When selected, a context menu option brings up an AlertDialog. I want the user to enter text into an EditText in the AlertDialog, and when the user presses PositiveButton, the value of EditText is able to be "returned" to the main method. Here is…
thePITman
  • 191
  • 6
  • 15
4
votes
1 answer

Force Edit text to remove focus after submitting list in recyclerview

I have a recycler view which have multiple edit text. On adding items to recyclerview, focus always shift towards the first editText of screen. I have already used android:focusable="true" and android:focusableInTouchMode="true" with parent layout…
4
votes
4 answers

EditTexts inside ExpandableListView

Hi I'm trying to make an activity that displays an ExpandableListView as shown in the figure. When you click on the group it expands and shows a LinearLayout with a textview and an editext. Right know the problem I have is that when a click on the…
Julian Suarez
  • 4,499
  • 4
  • 24
  • 40
4
votes
4 answers

EditText box height issue android

I have a linearlayout in which i have one image view, one textview, two edittext and button. When i run my application in emulator or in my device the height of the edittexts seems bigger in size rather they should be single line edittext boxes. My…
Rahul Sharma
  • 3,637
  • 2
  • 20
  • 18
4
votes
1 answer

Android EditText: Lose Focus After Input

I am trying to figure out how I can force an EditText to remove its focus after a number has been inputted so that its OnFocusChangedListener will fire. Basically I want the user to be able to input a number and then have a calculation adjust as…
ryandlf
  • 27,155
  • 37
  • 106
  • 162
4
votes
3 answers

How to fill edittext with placeholders until it is not filled

I faced the following problem: I need to implement the solution for the case when the phone should be entered to the EditText. This phone should have non-removable part and last four numbers should be filled with underscore at the beginning and then…
4
votes
1 answer

Magnify glass for EditText like in iphone: is it possible to draw outside of a view?

I am trying to make a FastSelectEditText, so that: Text can be selected by long click and slide the finger. When sliding and selecting, show a magnify glass(like iphone), so that user can see the text under her finger. Unfortunately there is…
Ben Lee
  • 3,418
  • 1
  • 18
  • 19