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

setSoftInputMode for a Dialog to not hide EditText while typing?

I have a Custom Dialog that has an EditText at the bottom of the view. When I select the EditText, the keyboard comes up but hides the EditText within the Dialog.. I know that you can use windowSoftInputMode for an activity and the Reference says…
Yudhistre
  • 107
  • 4
  • 13
4
votes
4 answers

How to draw lines in Android Edit Text?

I am trying to build a notepad application. I want to have lines in the Edit Text view of my application which is a multi line Edit Text. Please let me know how to do this. Thank you for your time and advice.
Vinod
  • 31,933
  • 35
  • 96
  • 119
4
votes
3 answers

Show keyboard in Dialog

I have this piece of code (RelativeLayout is a just one row inside my main layout, not important). RelativeLayout cellphoneNumberLayout = (RelativeLayout) findViewById(R.id.cellphone_number); cellphoneNumberLayout.setOnClickListener(new…
svenkapudija
  • 5,128
  • 14
  • 68
  • 96
4
votes
2 answers

Set editText text to upper case on addTextChangedListener making app hang

I want to make upper case even if the user write lowercase in edittext.So I am setting ediText text to upper case on addTextChangedListener as per below. editText.addTextChangedListener(object : TextWatcher{ override fun…
Purvesh Dodiya
  • 594
  • 3
  • 17
4
votes
2 answers

Problem with SQLite DB for Android

I am new to Android and have been following tutorials to create an app. I am having much difficulty with inserting data into a database. I have tried everything I can think of with no avail. The database class is: package…
John
  • 59
  • 3
4
votes
0 answers

AppBarLayout won't scroll to focused EditText

I have a layout where EditText is inside AppBarLayout. If user clicks on EditText, keyboard is shown but the layout won't scroll to make EditText visible. Normally, if EditText would be in ScrollView, it would scroll so that EditText is above the…
4
votes
2 answers

Android EditText - Input with numbers only

I created an EditText that only allows numbers as an input. It's a very simple EditText with nothing special:
Anael
  • 417
  • 1
  • 6
  • 18
4
votes
2 answers

Android programming - Multiline EditText inside ListView

I have a ListView, in which each row contains a TextView and an EditText. I find that I can't get multiline with this EditText. Whatever I type in it, the string doesn't wrap to next line. Besides, the soft keyboard doesn't show "Enter key" --…
Eric
  • 41
  • 3
4
votes
0 answers

Android Development: Keep EditText Selection Highlight On Lose Focus?

I was wondering if it's possible to keep an EditText's orange highlight around selected text when the EditText loses focus, until the user changes the selection? I'm creating a find/replace feature in my app and say if the user selects the first 3…
AlexPriceAP
  • 1,987
  • 6
  • 26
  • 41
4
votes
2 answers

Custom cursor drawable for EditText is ignored on API Q+

I want to set custom drawable as cursor for EditText. For API < Android Q I'm using reflection and it works like intended. Starting from Android Q we have convenient method setTextCursorDrawable(@Nullable Drawable textCursorDrawable). I use it like…
4
votes
1 answer

how to remove ` frequently used email ` toast on my edit text?

as you can see from the image above, there is something like a toast with text "Frequently used email" . whenever I complete typing an email then that toast will appear, I don't think I make it programmatically. It seems it appears only on Android…
sarah
  • 3,819
  • 4
  • 38
  • 80
4
votes
2 answers

Change focus of edittext when tap outsite edittext

I have a edit text to input url, and a webview to display the website My problem is: when i go google.com, i tap to my edit text so my edit text has focus. I tap to search area in gooogle, but my edittext doen't lose focus. How can can i change…
Nam Vu
  • 5,669
  • 7
  • 58
  • 90
4
votes
2 answers

How to give Magnifying glass effect in EditText in Android?

I want to give a magnifying glass effect to the EditText.As it gives on Searching view in iPhone. Is it possible to do in Android ? How can I do this? Please Help Me
Arun Badole
  • 10,977
  • 19
  • 67
  • 96
4
votes
2 answers

How to add a drawable at the right end of a "TextInputLayout" dynamically?

I am trying to make something like this example: I want the drawable to show when I verify the user name from the server. I am using Material Design Text Input Field & EditText. Yes, I can do it with a simple EditText and an ImageView, but I want…
4
votes
2 answers

How to apply shapeAppreanace in EditText and TextView using Material Design in Android

I want to design a TextView and EditText with round corner. There is one straight forward solution for this. Using custom shape background. But since material design 1.1.0 introduces shapeAppearance theme attribute to apply a different shape to the…
1 2 3
99
100