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 multiple EditText with OnTextChangedListener

this is really strange, yesterday I asked the question Yesterdays question how to implement multiple editText listeners to avoid duplicating my code. I was kindly provided an answer (which I swear I tried out) but today I am getting no where with…
Purplemonkey
  • 1,927
  • 3
  • 27
  • 39
4
votes
2 answers

how to write on border of edit text

I need to create an edit text which contains some text relevant to that text box. How to do that. Although there are some ways through HTML. But I have no clue how to do that in android. Can any body suggest me something for that. For clear view I…
Android
  • 3,828
  • 9
  • 46
  • 79
4
votes
1 answer

Android - Changing Positive Button Text of EditTextPreference's Dialog Programmatically

I am trying to change the positiveButtonText of Dialog in the `EditTextPreference. I have tried the following with no success : // The reference to the preference in the view heirarchy mUrlPreference = (EditTextPreference)…
500865
  • 6,920
  • 7
  • 44
  • 87
4
votes
2 answers

Android EditText text and hint layout

I have a question about EditText in Android. How can I set the hint align center but text align left? Thanks a lot. I just want to make the cursor locate at left and hint center in EditText
Tim Wong
  • 277
  • 1
  • 4
  • 17
4
votes
2 answers

HTC Sense/EVO not respecting EditText color when writing

I'm having a problem on an specific device, the HTC EVO on Android 2.3.x. I think this may be a HTC Sense-specific problem. I basically have an EditText with a transparent background (#00000000) and white text, set to allow an email address input…
zeh
  • 10,130
  • 3
  • 38
  • 56
4
votes
5 answers

How To Validate an EditText to handle numbers only in Android?

How can I validate a text view in android to handle positive integer numbers? I don't want it to accept any character or signs etc...
4
votes
7 answers

Android EditText Capital Characters

I have an edittext and I want any character that I type in edittext show in Capital letter. I have used this: edittext.setInputType(InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS); But it is not working. I want to do it dynamically. Any ideas.
rizzz86
  • 3,862
  • 8
  • 35
  • 52
4
votes
7 answers

Align ImageView with EditText horizontally

I'm trying hard to find a way of aligning an EditText and an ImageView properly on Android. I keep getting this result: The XML part is quite simple:
goncalossilva
  • 1,830
  • 15
  • 25
4
votes
3 answers

Disable suggestions for EditText

What I have tried: specifying the inputType for the EditText on the main.xml page as... textFilter text|textNoSuggestions textNoSuggestions In the java file in the onCreate EditText hex = (EditText)…
Rhyono
  • 2,420
  • 1
  • 25
  • 41
4
votes
5 answers

Android EditText within TableLayout runs off

I have a simple sign in tablelayout, but the contents inside are stretching too far to the right. Everything appears to me to be centered. Or it seems like the EditText is trying to center itself inside the main parent and not IT'S parent…
Jesse
  • 2,674
  • 6
  • 30
  • 47
4
votes
2 answers

why keyboard in Landscape mode appear like this?

I have a problem with showing keyboard in landscape mode. My activity contains an EditText where user must type a license number, and a Button ok. It looks like this (image is rotated) . I put the following code to appear the keyboard when activity…
Gabrielle
  • 4,933
  • 13
  • 62
  • 122
4
votes
4 answers

Android; Declaring edittext in class body (Out of any method)

I have experience with programming languages but am a bit new to android programming. I have a program with some fields that function as labels(textview), buttons, and data entry(edittext). Whenever i declare them at the beginning of the program out…
Dogan Sinar
  • 41
  • 1
  • 1
  • 3
4
votes
1 answer

Android : KeyListener of EditText not working

I'm trying to filter the input char of an EditText to allow only valid float value. (e.g. :"12,45", only one comma, ...). For this, I use the KeyListener (dont confuse with onKeyListener or textChangeListener. I want to prevent the user from…
Loda
  • 1,970
  • 2
  • 20
  • 40
4
votes
1 answer

Android : My app crashes when there is a blank editText field

I have a problem with my code. It keeps on crashing when i have a blank editText field. This bit of code is in the settings of my app and works the data fine but when there is a blank field it crashes the program. Here's the code for it. Please…
Nick
  • 2,593
  • 3
  • 30
  • 59
4
votes
1 answer

How can I have both a return and a done keys in an EditText's softkeyboard?

how can I have both a "done" (close the softkeyboard) and a "return" (line break) keys in my softkeyboard (Samsung Galaxy 10.1, Android 3.1, portrait mode) when writing in an EditText? Using
jul
  • 36,404
  • 64
  • 191
  • 318