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.

android-edittext
Filter by
Sorted by
Tagged with
0 votes
1 answer
419 views

Android EditText with animated hint?

How can I create an Android EditText with a hint like this (with animation)? So when I tap inside the EditText, the hint shrinks and goes on top of the input text, like in this example:
CookieMonster's user avatar
0 votes
1 answer
71 views

Displaying the value of the EditText in the TextView at the Simultaneous(online) in kotlin

I want the text written inside the EditText to be displayed simultaneously in the TextView without pressing the button (kotlin) thank you
MR loo's user avatar
  • 5
0 votes
2 answers
37 views

ANDROID STUDIO, Something written in editText should stay there untill the user edits it again. it should stay there even if app is closed

I am trying to make an app in android studio. I want my app to store what user types in the app in editText. Even if user opens the app after 1 week it should stay there in edit text. thanks.
Gogi P Bhal's user avatar
1 vote
0 answers
206 views

How to set gravity for TextInputLayout's error message

I am using TextInputLayout to show error message. By default, TextInputLayout's setError() shows error text at the bottom of it. Please refer to No1 Image. Now, accordingly to my designer design, I ...
ZarNi Myo Sett Win's user avatar
1 vote
1 answer
710 views

How to validate EditText input in custom view

I'm trying to make a custom view of an EditText with a TextView under it which says the error of the validation. My idea is to make a validation of min and max length in my custom view and make ...
HeraGonz's user avatar
  • 345
2 votes
0 answers
220 views

How to Implement TextWatcher in EditText - Android?

I am inflating a Linear Layout dynamically 2 times which has some editTexts and some TextViews The layouts are inflated successfully, but when I am setting a TextWatcher , then the effect is seen only ...
ashish's user avatar
  • 63
0 votes
1 answer
32 views

How to resolve view pushing problem of Android keyboard when clicking on EditText?

In my Android app, when a user clicks on EditText the keyboard appears and just pushes all the screen views upwards dislocating my UI components. How can I solve this issue, I want the keyboard to ...
ARJUN YADAV's user avatar
0 votes
1 answer
2k views

Inserting an AnnotatedString into an EditText (Jetpack Compose)

I'm trying to solve the following issue. For example, I'm writing this text - "Hello *world*". After I stop writing, for example, after a second, the word "*world*" should be ...
San's user avatar
  • 98
1 vote
1 answer
247 views

Remove whitespace before Paste with a Max Length

So I use TextInputEditText with a max length of 8 . If I paste "1234 1234", it will become "1234 123". My goal is for it to become "12341234" The hard part is the max ...
Wilson Lesley's user avatar
0 votes
0 answers
39 views

OnTextChanged triggered before writing anything

Im using EditText and trying to validate it. In my validations, Im checking if the EditText is empty and if it is, shows an error. My problem is that my error is showing when the activity starts and ...
HeraGonz's user avatar
  • 345
-1 votes
1 answer
2k views

Why am I getting "java.lang.InstantiationException has no zero argument constructor"?

I saw other related post to it, but those posts couldn't solve my problem. I am making a Time Table app. I have made a constructor of my TimeTable class that I will use in my Log class. From the ...
Parth Gupta's user avatar
2 votes
0 answers
214 views

Give EditText focus without showing the soft input

I have an EditText configured in the following way because I have a custom keyboard to display: binding.editText.showSoftInputOnFocus = false It works alright but I want to give the focus to the ...
lorenzo's user avatar
  • 1,643
0 votes
0 answers
51 views

Why can't I add another cardView?

I am creating a time table app. That app has an add button which adds new cardView - row - in the ArrayList rows. Before adding a new cardView I have one if condition that checks whether the previous ...
Parth Gupta's user avatar
1 vote
1 answer
45 views

How to add multiple image into EditText using spannable or any other way?

I am creating a note taking app, I have done text section and its working properly. Also database working properly. But I want to add image in the EditText. When user add an image, it will place at ...
MS Moshiur's user avatar
0 votes
1 answer
274 views

How to make the soft keyboard hide when clicked outside of the focused EditText BUT not if another EditText is clicked?

I want the focused EditText to lose its focus and the soft keyboard to hide when clicked outside the EditText box BUT only when another EditText is not clicked, so these are the scenarios: The ...
sowinskidev's user avatar
0 votes
1 answer
648 views

How to remove padding for the bottom line of the TextInputEditText

I'm trying to remove all padding of a TextInputLayout and a TextInputEditText, but with padding=0dp the line at the bottom of the TextInputEditText keeps it padding left and right. How I can remove ...
Víctor Martín's user avatar
0 votes
1 answer
185 views

How do i get an input of time in milliseconds?

private long START_TIME_IN_MILLIS; private long TimeLeftInMillis = START_TIME_IN_MILLIS; i have declared these variables, which is meant to store an input from an EditText, but in my OnCreateView i ...
RakibulB's user avatar
1 vote
1 answer
127 views

Need help outputting "You must enter a name" when nameText is null. With the code I currently have it doesn't recognize when the nameText is empty

MainActivity package com.example.greetings_john_sporn; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import ...
John S's user avatar
  • 13
0 votes
1 answer
203 views

How to make EditText Scrollable only when it is focused inside a scroll view (Kotlin)

I have a scrollable EditText inside a ScrollView, and i want to scroll the ScrollView even when the touch is over the EditText (not focused), and make the EditText scroll only when it is focused i can ...
ivan14's user avatar
  • 11
0 votes
1 answer
45 views

Search In Json Functionality

So, I get some data from a nutrition database and I want to add a search option. I'm new to Android Studio so some advice would help me. This is the app: This edittext should search in the database ...
Emil Mester's user avatar
2 votes
0 answers
397 views

How to Fix Keyboard Navigation Focus Down Getting Stuck in EditText on Android API 26+

The exact same APK behaves differently on Android versions before API 26 and after it. I have simplified my layout down to the following example: <?xml version="1.0" encoding="utf-8&...
Craig Heath's user avatar
0 votes
1 answer
149 views

Can you make a EditText input from right to left in Android?

I was asking if you can control input on an EditText to move from right to left? The EditText would have to support insert/delete etc. from right to left as well. Like if I keep inserting 1, 2, 3 it ...
Ganapati Majhi's user avatar
1 vote
0 answers
192 views

How to let keyboard just push some view?

I have a activity <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/...
GHH's user avatar
  • 1,917
-1 votes
4 answers
122 views

How do I start typing my description box in EditText from the top line in Android Studio?

I have added the picture to show that my current description box does not start from the first line when I start to type, how do I make it to start from the top left corner? <EditText android:...
Lim Wei Li's user avatar
0 votes
1 answer
62 views

How to disable one edittext when we start typing other editext in android?

I have a form with two editext and condition is only one should be enable when we enter value to any of edittext e.g We have 2 edittexts ...Edittext1 and Editext2 case 1: When we type edittext1 then ...
MKE SIRIES II's user avatar
2 votes
1 answer
3k views

How to close the Android Soft Keyboard

I have a form-like dialog. The soft keyboard opens when the user clicks an EditText. And then it will not go away. How can I close the keyboard when the user moves on from an EditText to the next ...
Kaitlyn Hanrahan's user avatar
1 vote
1 answer
104 views

how to return to the original backgroundtint colour for edittext

Hi I have an edit text and I want to change the backgroundtint to the original color. this way I am changing to the red colour but want to return to the original colour, how can I do that please ...
BRDroid's user avatar
  • 4,196
1 vote
2 answers
702 views

Barcode Scanner - (Data Wedge) TC26 device reads data twice in EditText

I am working on a barcode scanner using DataWedge API's for TC26 device. I can see sometimes the value in EditTextBox the value is shown twice randomly. For example : value 123 is scanned but in ...
nethra gowda's user avatar
0 votes
1 answer
74 views

Animation yoyo keep run when typing Edittext

when typing edit text yoyo animation keep run how to keep typing show animation Once ? text_send.addTextChangedListener(new TextWatcher() { @Override public void ...
hamza's user avatar
  • 33
0 votes
1 answer
50 views

send id number from recyclerview to another activity

I have an activity that contains a RecyclerView and a button that open another activity with some EditTexts that insert the data to google sheet and I read all the data of it in the RecyclerView, I ...
Ahmed Zaqout's user avatar
0 votes
1 answer
401 views

how disable function: double space converting to point(dot) in EditText Java AndroidStudio

when type space two times in the row it automatically converting(replacing) to dot(". "). I want to disable this function only in my EditText
Andrew Production's user avatar
0 votes
1 answer
618 views

EditText not showing the hint or the outline box until focused

I saw that there are numerous threads raised on this topic but none of them seems to solve my issue. I have an EditText inside of InputLayout and it shows blank until focused. <com.google.android....
George Petre's user avatar
1 vote
2 answers
945 views

set length character Emoji Edittext Android Kotlin

i have 1 edittext maxLength = 30, but i can only type 6 character emoji dog => 1 emoji dog = 6 regular character. So please help me type 30 emoji dog. Thanks everyone. [enter image description here]...
Hiền XT's user avatar
0 votes
0 answers
118 views

TextWatcher class trims space from end when spacebar is pressed and cursor moves to beginning of editText

Below is my textWatcher class: class MyTextWatcher(private val editText: EditText) : TextWatcher { override fun beforeTextChanged( s: CharSequence?, start: Int, count: Int, ...
Prateek Sharma's user avatar
1 vote
1 answer
373 views

How to add `Done` and `Cancel` imei option on android keyboard for edit text

not sure if this is possible, I have an edit text and when it is clicked a number keypad opens and I want to add actionSend which will make an api call to send the value in the edit text. If the user ...
BRDroid's user avatar
  • 4,196
1 vote
1 answer
48 views

Predefined symbols in an EditText

I use a referral system, with codes like this : XXXX-XXXX-XXXX How can I predefine dash in my EditText?
busooCombo's user avatar
0 votes
1 answer
653 views

How can I specify the position of editText in CardView?

<androidx.cardview.widget.CardView app:cardCornerRadius="5dp" app:cardElevation="8dp" android:layout_width="370dp" android:layout_height="450dp&...
KKot's user avatar
  • 163
1 vote
1 answer
151 views

Is there a way to use EditText to underline errors in the text as the user enters it?

Is there a way to use EditText to underline errors in the text as the user enters it? Or an alternative control that allows that kind of formatting? I'm trying to process text as a user is entering it....
Mark Fairchild's user avatar
0 votes
1 answer
479 views

Custom drawable background for Android EditText

I would like to create a custom drawable background for an EditText component in my Android layout. This should include a lower border spanning the entire length of the EditText, and 2 connected ...
nick_j_white's user avatar
1 vote
0 answers
405 views

Detecting Backspace click on Key_Down event in Android soft keyboard

I have searched for close to 6 months and I can't get a proper code on how to detect a backspace click in an EditText view. Using the setOnKeyListener and doing if(event.getAction() == KeyEvent....
KANAYO AUGUSTIN UG's user avatar
0 votes
1 answer
488 views

How can I set the 'text' value of a TextView to be based off an EditText value or variable?

I'm currently trying to make a DnD character sheet app using Android Studio for my University Final Year Project, and I'm having some issues with creating my layout. I am currently tinkering with ...
CS_Noob_360's user avatar
0 votes
0 answers
208 views

How to make edittext scrollable in android kotlin?

here is XML code:- <com.google.android.material.textfield.TextInputLayout android:id="@+id/Description" style="@style/Widget....
CHETAN's user avatar
  • 502
0 votes
1 answer
51 views

Get the text from an EditText created dynamically by a function

I am working on an Android application using Java. I'm using a spinner where it offers different options for a user to select and then I try to update the UI according to the selection, adding more ...
Lucas Slepetys's user avatar
0 votes
1 answer
57 views

How to Make 2D ArrayList of EditText in Android Studio using Kotlin?

''' class MainActivity : AppCompatActivity() { private var button: Button? = null private var textList: ArrayList<ArrayList<EditText>> = arrayListOf(arrayListOf()) override fun ...
Suryansh Singh Rajput's user avatar
0 votes
1 answer
620 views

How can you listen to soft key events sent to a View with an InputConnection?

I would like to create a custom text editor view in Android, with customizable key controls, meaning that I need to handle all software keyboard key events. To do this, I can extend View and override ...
Skanderbeg's user avatar
0 votes
1 answer
134 views

Android EditText number pad keyboard with version like filter(TextWatcher)

EditText should accept input like "1.0.1" means multiple "."s. and keyboard should be number pad(I know EditText's inputType should be numberDecimal). But numberDecimal only ...
Akshay's user avatar
  • 822
0 votes
1 answer
490 views

Get data from list of EditTexts in a recycler view to a list?

I am having an EditText in a TTextInputLayout as a Row_item for my recycler view, On the click of a button I am incrementing the count value in that recycler view and adding the edit text views in the ...
Manish Rajpurohit's user avatar
0 votes
0 answers
67 views

Multiple editText in RecyclerView. The values keeps cloning from one to another

I am creating a program for my company, where I need a part where is consignation for money. The money types are in database what I get from an api. So I use RecyclerView with elements. My problem is ...
Riko's user avatar
  • 1
0 votes
1 answer
546 views

How to disable default scroll behavior of an EditText?

The title of question might look similar to other questions but It's not. I have several strange problem that I am not being able to solve it. I have a xml layout and the structure of that layout ...
Encoder's YT's user avatar
0 votes
0 answers
210 views

clear edittext when start typing

I got some issue with my code and I can't find anything to help me. I'm trying to clear my edittext when I'm typing any char. I got this error /AndroidRuntime: FATAL EXCEPTION: main java.lang....
Heia's user avatar
  • 1

1
3 4
5
6 7
243