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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

nextFocusDown won't show keyboard if next edittext inputType="textPassword"

<EditText android:id="@+id/account" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerVertical="true&...
GHH's user avatar
  • 1,725
-1 votes
0 answers
9 views

Android ScrollView scrolls automatically after I update the highlight in EditText and call setScrollY

I have a EditText in the ScrollView. There are many lines in the EditText.Sometimes I set some lines to highlight when TTS is speaking,then I set the Y coordinate by setScrollY to show the lines on ...
peng6662001's user avatar
0 votes
0 answers
13 views

Android Textwatcher gets called without typing

I have a TextWatcher added to some of my EditTexts. The problem is that the afterTextChanged gets called just by scrolling. So if the EditText is currently not visible and i scroll up or down to the ...
froots's user avatar
  • 65
2 votes
0 answers
15 views

How to detect key event KEYCODE_DPAD_UP_RIGHT and KEYCODE_DPAD_UP_LEFT in android

For the below code: val MyKeyListener: View.OnKeyListener MyKeyListener = object : View.OnKeyListener { override fun onKey (v: View?, keyCode: Int, event: KeyEvent?): Boolean ...
Jatin guglani's user avatar
0 votes
1 answer
27 views

Custom Design for EditText in XML

I want to get this design in android xml, not exactly but something close to it. I'm still new to android so please be more specific in your appreciated answers. Custom EditText tried using custom ...
Ammar Bakr's user avatar
4 votes
0 answers
22 views

Unable to handle(Keypress) modifier keys in android studio's emulator

I have an EditView in which I have set the below OnKeyListener to record the ctrl + left arrow key and ctrl + right arrow key. val MyKeyListener: View.OnKeyListener MyKeyListener = object ...
Jatin guglani's user avatar
1 vote
1 answer
29 views

How to make custom input pin code Android?

I make project on Kotlin Android. How can i make the same field and same input? It seems to me creating a few edittexts is not good decision enter image description here enter image description here ...
Artur's user avatar
  • 13
1 vote
0 answers
31 views

Android. How to implement a custom keyboard?

I'm going to develop a custom keyboard, but I don't understand the sequence of steps that I need to perform in order for everything to work properly. My requirements: the keyboard should automatically ...
testivanivan's user avatar
  • 1,008
1 vote
2 answers
41 views

How does the remove property of the SpannableStringBuilder class really work? TextEditor in Android (Kotlin)

I'm developing a small native Android project using Kotlin. I intend to create a small text editor with the various buttons bold, italic, underline and so on. Unfortunately I've been really trying for ...
Fantastico's user avatar
0 votes
0 answers
7 views

Why am unable to take the test in editText using the getText().toString()

Unable to get the Text in the editText I tried to get the Text in editText once the user Clicks the button and I tried to set that text into a TextView..but after entering the input when the user ...
Ponraj S's user avatar
2 votes
0 answers
39 views

EditText-backed TextField in Compose

I want to implement Image keyboard support into a Compose app. As this two-year-old issue shows, there are currently no public APIs to achieve it. Although TextInputServiceAndroid class has a fun ...
Calamity's user avatar
  • 740
0 votes
0 answers
14 views

the last modified value of the list is not getting save in shared Preferences on one click of save button but gets saved after twice clicking save btn

i'm trying to display azan names with their timings on a recyclerview in android studio java, when user opens the app, the default code done by adding library displays the timings and infront of the ...
ayna khan's user avatar
0 votes
0 answers
10 views

why setSelection doesn't work but when wrapped in post, it works fine

I have a custom EditText class and move the cursor to the end with the touch event by adding an OnTouchListener: class PhoneEditText(context: Context, attrs: AttributeSet?) : AppCompatEditText(context,...
ispite's user avatar
  • 87
0 votes
3 answers
33 views

onTextChanged fires twice due to two super class overrides

I make custom view and adding a TextWatcher, but the onTextChanged method is also on TextView. And when i override it, it applies to 2 super classes. Is it possible override only one super class? ...
ispite's user avatar
  • 87
0 votes
1 answer
31 views

How to hide FloatingActionButton when scrolling TextInputLayout?

I have a FAB in my fragment that overlaps a long text in the TextInputLayout. How do I make it hide when scrolling up and appear when scrolling down? Is it possible to use xml only? I tried to add ...
vvkdev's user avatar
  • 1
0 votes
0 answers
49 views

How to search a sentence not a word from the ListView in android programming?

In my code, searching for a word can be found very well, But unfortunately, searching for two words or more doesn't work. How to search a sentence (two words and more) in android programming? My Java ...
Shahin Sadeghi's user avatar
1 vote
1 answer
31 views

Edittext with 16digits along with hint and text android

I have an Edittext that represents an Debit card number. For those don't know debit card number has 16 digits. I want to present an empty edittext with 16 "-" characters with one space in ...
james04's user avatar
  • 1,640
1 vote
0 answers
72 views

Recomposition Error in live edit Andriod jetpack

this is my main Activity , I am getting recomposition error on change the Text value on android emulator class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?...
Mohammed Arfath's user avatar
0 votes
1 answer
67 views

When user input emoji into EditText, it's count like 2 symbols. How to count emoji like 1 symbol?

I have InputEditText from Google Material. And when I enter emoji from soft keyboard, on counter instead of 1 symbol shows 2 symbols per emoji. How to avoid it and count emoji like 1 symbol? <com....
Денис Попков's user avatar
0 votes
0 answers
15 views

Talkback reads Maximum length reached message even if EditText max length is no reached

When I set maxLength in a EditText I am getting "Maximum length reached" everytime I add a letter. I tried in several ways. Using EditText, AppCompatEditText and I also tried with a solution ...
Iban Arriola's user avatar
  • 2,546
0 votes
0 answers
14 views

Android EditText separates the cursor position from the water droplet position after scaling the Framelayout layout

Here is the demo Images: Before After Android EditText separates the cursor position from the water droplet position after scaling the Framelayout layout As mentioned in the question, I added an ...
user22280345's user avatar
0 votes
0 answers
18 views

Change visible EditText in android [duplicate]

I want to change edittext from picture 1 to picture 2. This is my code for picture 1 <EditText android:id="@+id/edt_password" android:layout_width="...
Do Ngoc Nhi's user avatar
0 votes
0 answers
51 views

kotlin, emoji keyboard overlapping content

image-> first image image-> second image-> 3 Hi all, ran into a problem with the keyboard overlapping content. I decided to add emoji keyboard in the application, for this I used this library:...
Loppllo Fg's user avatar
0 votes
0 answers
14 views

EditText is losing focus

I have a MyCustomView (inherits from Android.Views.View) which I render myself in its onDraw method. It is surrounded by a ScrollView to make it scrollable. Furthermore it needs to accept text input. ...
Michael Rumpler's user avatar
0 votes
0 answers
12 views

InputConnection.commitText is replacing the whole text instead of concatenation

I am creating my own custom keyboard and I am point the keyboard to the EditText using etInputData.onCreateInputConnection(EditorInfo())!!. In my layout, I've used Custom TextView and when user clicks ...
Mustansar Saeed's user avatar
0 votes
0 answers
25 views

Unable to get data from edittext after pasting the data from clipboard

so i have this scenario where the data from clipboard is getting shown even if the data im storing in the variable is from the editText.getText() this is the string i pasted "https://www.threads....
Vasant Raval's user avatar
1 vote
0 answers
24 views

setError icon overlapping the outline of TextInputLayout (TextInputEditText)

So I've been having this problem for a while now and can't figure out how to fix it. The same thing was happening with ExposedDropdownMenu and the arrow icon on the end, but I gave up eventually. I've ...
tbesvir's user avatar
  • 11
0 votes
1 answer
32 views

Change the default behaviour of edit text in android

So I have make a bottom sheet drawer inside it i have a recycler view which have a set of item in list manner. so every item on click opens and have a chat box in it. so the problem here is i have ...
Shubham Sharma's user avatar
0 votes
0 answers
42 views

Easy way shortened text in EditText

I'm looking for customizable shortcut text in Android Java. I tried this: @Override public void onCreate(Bundle savedInstanceState) { String strxd = "Hello World XD"; int xdindex = ...
fkybrd's user avatar
  • 21
0 votes
0 answers
27 views

EditText allow only two spaces and not allowing more than two spaces

In my application, I have edit text field. And this edit text filed should allow only two spaces for Example Mike Graham John. And not allowing more than two spaces like the below word Mike Graham ...
rams's user avatar
  • 1,558
0 votes
2 answers
56 views

How to know if user is typing something in an Edittext (Android) [duplicate]

So the idea is to check if the user is typing anything and then take that text length and show it somewhere. I used the max length attribute to limit the user entering big text, but I also want it to ...
Newbie_programmer's user avatar
0 votes
0 answers
20 views

How to determine if the user has scrolled a scrollable multi-line EditText to the bottom of the text?

In an Android app written in Kotlin, I'm using a scrollable multiline EditText. The EditText is not inside a ScrollView. Instead, I'm using the scrolling feature of the EditText class. I set an ...
Barzee's user avatar
  • 897
0 votes
0 answers
26 views

Removing auto click from links with cursor at the end of the link in Android

I have a editText which can accept links. I have set autoLink to true. I need to click at the end of the link and start typing another word or any text. But the problem is that, when I click at the ...
Shivang Gautam's user avatar
1 vote
1 answer
607 views

Error "No speakable text present" although having android:hint

Even though I already have the android:hint field but still got the error message "No speakable text present. This item may not have a label readable by screen readers." I want to a few ...
HaNgocHieu's user avatar
0 votes
2 answers
68 views

How do I make entered text spill over to the next line but indented in my Android app layout?

Consider the following layout: <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id=&...
FractalBob's user avatar
  • 3,265
0 votes
2 answers
25 views

Android set EditText style globally in theme doesn't work

As mentioned here Android set edit text style globally in theme doesn't work I have tried changing styles in theme file but globally it does not work. When I add it on individual component it ...
app's user avatar
  • 15
0 votes
2 answers
49 views

Making a list of lists of lists of EditText in Kotlin

I am fairly new to Kotlin and am trying to develop an app which requires me to access all EditText data from a table, that I generate programmatically also with Kotlin. That I managed to do, but I ...
Jayne's user avatar
  • 27
0 votes
1 answer
69 views

In the two-way data binding, modifying the data value in the viewModel flow.collect block fails to reflect on the UI

When I use two-way data binding, I change the data value in MutableStateFlow.collect, but the result is not reflected on the UI. login_fragfment: <data> <variable ...
曾江全's user avatar
0 votes
0 answers
16 views

Edit text focus out when submitting list in recyclerview

I'm using EditText for search functionality. But I when type something focus on Edittext. the keyboard appears but not typing until I click again on EditText. Note: if I comment submit code then focus ...
Faisal ur Rehman's user avatar
0 votes
0 answers
46 views

Is there any way to attach a cpp char* buffer(using jni maybe) to an Edittext Widget in Android

When we type text in an EditText widget in Android, the text is stored in the internal Editable object associated with that EditText instance. My actual application is in cpp and from cpp, I'm calling ...
Jatin guglani's user avatar
0 votes
2 answers
57 views

Android calculator app frontend: How to allow number inputs using buttons instead of keyboard?

We all know how calculator works. I am trying to make a calculator in android studio. The thing is I don't want the user to use their keyboard to give number inputs, instead the user is gonna use the ...
Newbie_programmer's user avatar
-1 votes
3 answers
46 views

How can I prevent an EditText from accepting a character 4 times consecutively in Kotlin for Android?

How to make edittext not to accept same character 4 times consuctivelty. For example it can accept "888" and not "8888". And if user writes a same character 4 times then the ...
Umar Afzal's user avatar
0 votes
0 answers
55 views

How to correctly pass data between ViewModel and EditText if the EditText was inflated through AndroidView

So, I am using Compose for my Android app and I need to replace the Compose implementation of TextField with EditText. As the title says, I am using AndroidView to do that. The problem is that I can't ...
Levox98's user avatar
0 votes
0 answers
22 views

Android EditText : Clear Edittext when select any emoji

I have entered some alphabets on edittext and select any emoji then edittext gets cleared. edittext not clear if we enter digits or special character and select emoji
android dev's user avatar
0 votes
1 answer
30 views

Apply/remove partial mask on a texview

I am trying to partial hide a number in a textview and when taping on an icon, it should display the full number. I receive a string of a specific lenght and need only show the last 4 digits. so by ...
Seb's user avatar
  • 2,947
0 votes
0 answers
26 views

Android EditText programmatically tint Typo Dialog

When you have an EditText and write an incorrect word, you get a red scribbly line. If you click on it, a MenuDialog appears where you can select either a correct translation or add it to the ...
Niklas's user avatar
  • 23.9k
-2 votes
1 answer
54 views

How to allow alphabets only in EditText Kotlin?

I need to allow alphabets only using EditText (like name) but it's allowing numeric values also I give FieldType.TEXT_PERSON_NAME -> etField.inputType = InputType.TYPE_TEXT_VARIATION_PERSON_NAME or ...
Krishna Dhas's user avatar
0 votes
0 answers
32 views

Is there any way to capture key (key code) event from SoftKeyboard in android

I wanted to capture the ENTER and Backspace key press event for EditText view from the softKeyboard (Not hardware keyboard) in android, like on any xyz_editText view someone press the Backspace key ...
Pranav anand's user avatar
-2 votes
1 answer
1k views

android studio xml file with edittext gives error : titletxt <EditText>: Touch target size too small how to fix

i have simple android application containing xml file with simple edittext and button and recycler view below my xml file <?xml version="1.0" encoding="utf-8"?> <androidx....
Malo's user avatar
  • 1,242
0 votes
0 answers
29 views

How to hide under line color of the edittext when it not focused and have text

This is what i want to achive: There are two pair edittexts in the picture. The bottom edittexts is possible with the current edittext. But if the edittext loses focus and has text in it, how can I ...
Metropol_Tilkisi's user avatar

1
2 3 4 5
242