12,078 questions
0
votes
1
answer
59
views
How prevent show virtual keyboard in edittext while typing on physical keyboard?
When I use this:
etID.ShowSoftInputOnFocus = false;
the virtual keyboard does not show on focus. That's what I want.
But when I start typing on the physical keyboard, the virtual keyboard pops up. ...
3
votes
0
answers
55
views
Intercept API 35+ system undo and redo
My editing app handles undo and redo by itself. Having the system handle it on top is just weird: the system undo is perceived as a text change and the user can then undo the system's undoes & ...
0
votes
0
answers
68
views
Why does my Android EditText context menu display incorrectly?
My Android game (NativeActivity) opens a system dialog with an EditText field for text entry. The dialog opens fine and the text is editable, but when I select some text in order to cut/copy, the ...
0
votes
0
answers
38
views
Empty AlignmentSpan.Standard span affect previous line in EditText
Some background:
I have EditText where user could choose AlignmentSpan.Standard span for each line independently. By default line has Layout.Alignment.ALIGN_NORMAL alignment.
The problem:
When type ...
0
votes
0
answers
92
views
What is the recommended way to implement inline @mention tagging in Android?
I'm working on an Android feature where users can tag other users using @mentions inside a document or invoice. The goal is to allow the user to type @, followed by a name, and have the app display an ...
0
votes
0
answers
44
views
EditText in RecyclerView only allows one character input at a time
The EditText input is limited correctly to 7 characters using InputFilter.LengthFilter(7), and that part works as expected.
However, I'm having a strange issue: when I type into the EditText inside a ...
0
votes
0
answers
46
views
What's the proper way to group each 3 characters with comma?
This Excel-like layout is implemented using RecyclerView.
For each EditTexts, the inputType is text because the requirement is to accepts these 2 formats:
Numeric input (separated by comma each 3 ...
1
vote
0
answers
50
views
Keyboard appears on top of EditText (cannot see what I am writing)
When I click on the etMessage (EditText), the keyboard appears, but it is on top of the EditText, therefore a user cannot see what they're writing.
When I remove the rvChat (RecyclerView), everything ...
0
votes
0
answers
85
views
Prevent the software keyboard from appearing in Android
I am developing an Android application in Java in Android Studio. My environment details are as follows:
minSdkVersion: 29
targetSdkVersion: 35
Device: Android device with physical keys
Use of custom ...
0
votes
0
answers
46
views
Android recyclerview requestFocus when scrolling up and down for edittext items only
I have recyclerview consisting of edittexts only. Those edittexts have various length. I want to stop scrolling my recyclerview on onViewAttachedToWindow when holder.getAdapterPosition() == vhIndex.
...
0
votes
2
answers
51
views
android:inputType="numberPassword" and setText method not working
I have an edittext in the form of
<EditText
android:id="@+id/txt_password"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:...
0
votes
0
answers
52
views
How to enable suggestions after change inputType in editText?
I want to dinamically change inputType in editText, but after first changing suggestions become disabled. I tried different ways to enable, but nothing helps.
This is my code:
edText....
0
votes
0
answers
52
views
How can I get image from gallery and place it in edittext with html?
That's what I tried to do:
private fun addImage(camera: Boolean = false) {
if (camera) {
val intent = Intent(MediaStore.ACTION_IMAGE_CAPTURE)
startActivityForResult(intent, CONST....
0
votes
1
answer
187
views
How to avoid Keyboard Options for Text Field in Compose
I have text field and it has its own custom input UI on the way. The Problem is i need to use my custom input, and do not want the keyboard to open when focus is gained on the text field. I don't want ...
0
votes
0
answers
46
views
Message set with "setError()" on a clickable TextView is not shown
I am not able to find the correct configuration for the behaviour I want. I have a layout with 2 TextView for displaying a date (birth and death date). To set both dates, the user touches (onClick() ...
1
vote
0
answers
58
views
EditText cursor slightly overlaps hint
Our designer noticed that our cursor slightly overlaps the hint text of an EditText:
Upon investigation, we found this appears to be the default behavior for whatever reason, and is even present in ...
1
vote
1
answer
48
views
How to create a custom EditText with a blinking red background for setting errors in Android Kotlin?
I want to create a custom EditText in Android that shows a blinking red background when there is an error. The idea is to visually indicate to the user that input is invalid.
Here is what I have tried ...
1
vote
0
answers
46
views
EditTexts are populated with same data after rotation
I have a layout with some EditText, like name, surname, city... I include this layout in another layout a couple of times, so there is two EditText for the name, surname, etc. The problem I face is if ...
0
votes
2
answers
44
views
Prevent EditText in SearchBar from covering MenuItem Button
I cannot figure out how to get the EditText to not cover the area where my MenuItem icon button is within this SearchBar.
Is there no best way this is handled?
Layout snippet:
<com.google....
1
vote
0
answers
264
views
How to prevent soft keyboard from closing when switching focus from TextField to EditText in Jetpack Compose
I'm working in a legacy codebase which uses EditText and I'm trying to introduce compose into our application. While playing around with the AndroidView(...) composable I noticed that the soft ...
2
votes
2
answers
168
views
How can I expand a Floating Action Button into an EditText in Android?
I'm trying to create a custom interaction where a Floating Action Button (FAB) expands into an EditText when clicked, and collapses back into the FAB when clicked again. The behavior I'm looking for ...
0
votes
1
answer
57
views
Why does Android have hint on TextView instead of EditText?
Hints are the text that appears in text fields (Android XML calls them EditText) before any text is entered, and disappears when the user adds any characters to the field. A basic example would be a ...
0
votes
0
answers
37
views
Java Android displaying new lines as aspaces [duplicate]
When I set a text in a EditText under Android Java, new lines appear as spaces rather than as actual new lines.
The EditText breaks lines once they are too long, but completely ignores new lines ...
0
votes
1
answer
48
views
How do I make android EditText not selectable, but still clickable?
I have an EditText that I want users to be able to click on in order to make the cursor appear and then enable writing text. However, I don't want the user to be able to select the text (in the way ...
0
votes
2
answers
73
views
Android Fragment: EditText setOnFocusChangeListener
The situation I am struggling with:
One MainActivity and four fragments... ...in a nutshell how to set a lost foccus event on a given EditText field contained on a Fragment?
In a simple activity this ...
1
vote
0
answers
62
views
Android: which Listener for EditText SearchView?
So Android code includes AddTextChangedListener that implements TextWatcher() and its methods. Android also includes OnQueryTextListener() and its methods. And there are many uses cases listed here ...
0
votes
2
answers
128
views
Rtl support for drawableEnd of AppCompatEditText Android
I am using this AppCompatEditText like this
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilCountry"
style="...
0
votes
1
answer
65
views
How to control the saving of words on the soft keyboard?
My application has password editText.
When I enter passwords, the soft keyboard saves them as new words.
How can I stop this from happening?
0
votes
1
answer
83
views
EditText doesn't accept digits as inputs
I have two EditTexts in my fragment. Both of them have android:inputType set to numberSigned|numberDecimal, since I wish to input only decimal numbers through them, which may be signed as well.
The ...
0
votes
0
answers
32
views
Is it possible to create to an EditText which doesn't wrap lines
I would like have an EditText widget input text in the following way
Long sentence without wrapping
Another long sentence without wrapping
etc
I need to enable both horizontal and vertical scrolling ...
0
votes
1
answer
34
views
Vertical and horizontal scrolling in EditText Android
I need an EditText with vertical and horizontal scrolling and a fixed size, I used ScrollView and HorizontalScrollView but the EditText does not fill the View above, leaving just a small square that ...
0
votes
1
answer
37
views
Fixing hint placement in my Android application
So, I use TextInputLayout and EditText to input email, but I have some trouble with hint placement. I also don't know how to change the color of this "I" symbol. Here is my XML for this ...
0
votes
0
answers
72
views
Accessing all EditText in ViewGroup getChildCount & getChildAt() vs getTouchables() vs getFocusables()
I'm trying to access all EditText which have been creating programmatically according to an array. As you know Java has getComponents() method which returns array of the components and which allows ...
0
votes
0
answers
58
views
How can I set the hint text if some value is entered into it? (Java,Andorid Studio)
I have 14 EditTexts in the XML, how do I retrieve the hint from the text where some value is entered and pass that hint from the text and set it in a TextView?
I've been trying to solve that problem ...
0
votes
1
answer
29
views
How to toggle visibility of two password fields with one toggle in Android XML using Kotlin?
I have two password fields one is password another is confirm password. I want to use only one toggle in password field EditText using TextInputLayout's property passwordToggleEnabled="true"....
0
votes
1
answer
119
views
How to use dots and comma to seperate numbers in kotlin
I'm trying to implement a text watcher with comma and dots but i couldn't find a solution. Here is what im trying to do if user input 10000 i need to show this in my edittext as 10.000 and if user ...
0
votes
1
answer
37
views
Android: How to print EditText with font type and size by WebView
I use WebView to print the content in an EditText as the sample code below.
The print function works well but the different fonts and sizes , that were set in EditText, do not display in the print ...
0
votes
2
answers
152
views
Achieving Smooth Scrolling in EditText with BottomSheetDialogFragment / DialogFragment
I recently explored an app that appears to be built using a BottomSheetDialogFragment combined with an EditText. This design choice allows for smooth scrolling when the amount of text entered into the ...
1
vote
0
answers
40
views
Android RecyclerView with EditTexts selecting range stops before next item
Let's say I have such a RecyclerView adapter consisting of EditTexts only.
public class MyAdapter extends RecyclerView.Adapter<MyAdapterJava.ViewHolder> {
private String[] textArray = {&...
1
vote
1
answer
42
views
FloatingActionButton doesnt change EditText item in the LIstView
I'm trying to change the EditText in my ListView by clicking the FloatingActionButton. I want to editText.setText from an array of strings from my activity for every ListView item
public class ...
0
votes
1
answer
50
views
EditText not taking input in Android?
I have one edittext
<EditText
android:id="@+id/selectvalue"
style="@style/searchList"
android:layout_width="match_parent"
...
2
votes
6
answers
444
views
how to make an EditText fully visible when opening the soft keyboard
In my Android activity, I have an EditText with other layouts before and after.
When I click in the EditText, the soft keyboard is open and the view is scrolled just enough so that I can see the ...
0
votes
1
answer
26
views
EditText with maxLines - how to show half of top line
In my layout there is EditText with android:maxLines="4".
And when text exceeds 4 lines, strongly last 4 lines are shown in EditText.
This is by design.
But how can I show 4 and half lines? ...
0
votes
1
answer
120
views
Android how to create an edittext that look like google login edittext
Is there any way to create a textfield in java that will look like one in the picture below?
i want know if i can extends EditText and create my own using custom EditText like floating label EditText
...
0
votes
2
answers
311
views
Suggestion text is not displaying in android keyboard
When I use inputType as "textUri", Suggestion text input is not displaying.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://...
0
votes
1
answer
56
views
Why Edit text input fill all the other edit texts when navigate to other screen and then come back?
I have a login screen with two edit texts username and password. Once I fill those edit texts and I navigate to register screen using: navController.navigate(R.id.registerFragment); and when I come ...
0
votes
2
answers
68
views
How to change background color Edittext error box
I can't change background color of error text box color.
Want to change the background color of error box not text color. The way i tried to set setErrorTextColor, setErrorColor, setBackGroundColor ...
0
votes
0
answers
102
views
Android : How do I know if the adb shell input text is completed?
I have an input field where I set the data by using adb shell and I want to know if the adb shell input text is completed or not. So if it is completed then I want to write some logic. For EditText, ...
0
votes
1
answer
91
views
Typed text is not displayed in notifications
I created an application that allows you to enter the content of the notification and select the date and time at which the notification should be displayed. Everything works fine, except that the ...
0
votes
1
answer
227
views
How to validate EditText in android in real time while entering the value in the input field before button click, like we do with jquery in web
I have to validate the EditText field in android in real time without clicking the button.
I have tried the validation with the requestFocus() method and setErrors() method but it gives the error ...