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

Keep an EditText value in a ListView

Good day! I'm carrying a ListView inside a EditText, where the user to scroll the value entered in the EditText changes position. How should I handle this? I thank! Method getView(): public View getView(final int position, View convertView,…
4
votes
1 answer

setError(R.string.bla) doesnt work?

Is there a way of using resources for setError for Edittext? I tried setError.(getString(R.string.bla)) as well and context.getString(R.string.bla) No of them sets the error the text bla corresponds in the strings.xml. it gets a number which I…
akd
  • 6,538
  • 16
  • 70
  • 112
4
votes
1 answer

how to enable vertical scrollbar of an edittext programmatically

I'm trying to implement android:scrollbars="vertical" in XML by Java code. I've tried method setVerticalScrollBarEnabled(true) but it doesn't work. Anyone can give me a suggestion? Thanks in advance.
Leo
  • 1,433
  • 23
  • 40
4
votes
3 answers

Edit Text focus in android

In my application i have edit text as follows. EditText1 EditText2 EditText3 EditText4 EditText5 EditText6 in xml i declared android:imeOptions="actionNext" and also i write editText1.setOnEditorActionListener(new…
Kiran_b
  • 199
  • 7
  • 15
4
votes
2 answers

more than one edittext in android

I want to make a input pin code input box as per below image .i have used four edittext for it but my problem is that i m unable to move the cursor from one edittext to other and vice-versa.Please help me on this.
user853341
  • 149
  • 2
  • 12
4
votes
0 answers

Programming "enter" and "shift-enter" for EditText using a soft keyboard

I am developing an Android application that makes use of EditText (Multiline). The devices I am testing it on lack hard keyboards, so as a result I (obviously) use the soft keyboard. When I touch/click on the EditText the soft keyboard appears. The…
4
votes
1 answer

EditText Minimum Length & Launch New Activity

I have a couple of queries regarding the EditText function in Android. First of all, is it possible to set a minimum number of characters in the EditText field? I'm aware that there is an android:maxLength="*" however for some reason you can't…
shamsad97
  • 291
  • 2
  • 5
  • 10
4
votes
1 answer

How to change text in EditText

I'm new to Android development, and have been able to set the text of EditText elements through XML code, but how can I do it in code?
4
votes
1 answer

How to avoid "jumpy" issue when interacting with soft keyboard visibility

Currently, we have an app with the following requirements Must use android:windowSoftInputMode="adjustPan" Use ViewCompat.setWindowInsetsAnimationCallback and ViewCompat.setOnApplyWindowInsetsListener to interact with soft keyboard visibility with…
Cheok Yan Cheng
  • 47,586
  • 132
  • 466
  • 875
4
votes
0 answers

Displaying keyboard below the the selected line using multi-line TextField

so I've got the following layout with the following TextInputEditText :
4
votes
6 answers

Validation in EditText allow IP or web Url host

I am in need to give validation on my EditText such that it allows me to enter a valid ip address format ( ?.?.?.? ) ie example 132.0.25.225 or web url format ( www.?.? ) ie example www.example.com logic is that if user type any numeric value…
Mohammed Azharuddin Shaikh
  • 41,633
  • 14
  • 96
  • 115
4
votes
1 answer

Password field in AlertDialog

I have created a alert dialog with edit text. How to set the property of the edittext as password? Here is the code... final AlertDialog.Builder alert = new AlertDialog.Builder(this); final EditText input = new…
Parthi04
  • 1,121
  • 4
  • 21
  • 39
4
votes
1 answer

EditText not updated after text changed in the TextWatcher

I have an EditText and a TextWatcher. Skeleton of my code: EditText x; x.addTextChangedListener(new XyzTextWatcher()); XyzTextWatcher implements TextWatcher() { public synchronized void afterTextChanged(Editable text) { …
Karthz
  • 53
  • 1
  • 2
  • 7
4
votes
3 answers

edittext setOnclicklistener android

I have a listview , and edittext on top of it. The edittext is searching data from listview. Listview is populated from string-array. The edittext search function is working fine, but onclick is not working. It should go to another activity passing…
sarah
  • 265
  • 1
  • 3
  • 13
4
votes
2 answers

Can't get maxLength from EditText! (InputFilter.LengthFilter doesn't have length parameter, now what?)

I tried to get EditText's filters, but InputFilter.LengthFilter does not have a LENGTH (or SIZE, or something) parameter! So, I can't get EditText max length using InputFilter! Am I missing anything? Any suggestions?
Christian
  • 7,062
  • 9
  • 53
  • 79