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
5
votes
3 answers

Search Functionality for Listview

i'm new to android. I'm just trying to make one simple search functionality for my app. My app consists one ListView one EditText and one Button for search. My ListView contents are listed from database using custom adapter which is extends…
5
votes
4 answers

EditText maxLength property not applied properly when setFilters is used

When I use setFilter method on an EditText to handle special characters, maxLength property is not working as expected. My code is below. editName = (EditText)findViewById(R.id.rna_editTextName); editName.setFilters(new…
user1242611
  • 75
  • 1
  • 7
5
votes
2 answers

A better solution for an AlertDialog with an EditText

I would like an AlertDialog with an EditText field in it to accept input. This in itself is pretty straight-forward. However there are a few "obvious" features that I would like as fallout from this request. I'll take them one-by-one. I am…
xbakesx
  • 13,202
  • 6
  • 48
  • 76
5
votes
2 answers

Edit text is not showing type characters

On one fragment I have layout like question.xml
Basit
  • 8,426
  • 46
  • 116
  • 196
5
votes
2 answers

Change EditText text from onTextChangeListener()

I am working on an Android application.In my app I have to use images based on the text.So I write OnChangeListener() for EditText.The following is my sample code. edt.addTextChangedListener(this); @Override public void afterTextChanged(Editable…
sarath
  • 3,181
  • 7
  • 36
  • 58
5
votes
1 answer

Phone-like only numbers soft-keyboard

I'd like to have a phone-like soft-keyboard that allows to input ONLY numbers. I can achieve the "only numbers" thing with inputType="number" (where the soft-keyboard is as default but allows only numbers as input) and the phone-like style with…
5
votes
1 answer

Android onkey - dispatchKeyEvent not firing

well, I've tried all the solutions I could find on stackoverflow and in other places, but the end result hasn't changed one bit: the only key that triggers the onKey event or the dispatchKeyEvent is the enter key on the virtual keyboard, and only if…
5
votes
2 answers

Clickable compound drawable in EditText that pops a view on click

I am using TextWatcher to validate my input and I want my red hint image to be clickable so I can give the user visual feedback as shown in the image below. What I have until now is the edit text with the red hint image appearing when I enter…
Nouran H
  • 1,992
  • 5
  • 18
  • 24
5
votes
1 answer

Android text cursor in EditText

I'm writing an application for android 2.1+. In one of my activities i have EditText with custom keyboard (KeyboardView with key mappings in keyboard.xml). Everything works perfect on android 2.1 ( everything is shown correctly - text cursor is…
kookee
  • 95
  • 5
5
votes
2 answers

Override styles for EditText in Android

I need to override styles for two EditText instances. I have two issues regarding this: 1) One EditText is for entering a password but with the same typeface. If I delete password=true it works. By default typeface=sans.