Most voted "edittext" questions
An Edittext is an overlay over Textview that is configured to be editable. Basically a predefined subclass of Textview that includes editing features, being a widget component for Android development that simulates a text box.
Learn more…86 questions
Sort by count of
-
6
votes1
answer10799
viewsCPF/Cnpj Mask in Edittext
I have an Edittext field, I want to know how I can define a mask for it to format the text inserted in the corresponding format, CPF or CNPJ, I tried using the method described in this other…
-
6
votes2
answers1173
viewsSpace between Edittext and keyboard on android
I wonder if it is possible to put a margin to space the edittext keyboard so it is not so close: The xml of how I am declaring Edittext: <EditText android:id="@+id/editTextNome"…
-
6
votes1
answer7667
viewsAndroid - Datepicker in an editText
Next, I would like a date selector to appear as soon as I click on editText I have, but what I found automatically setting the current date, I want it to be chosen... Follow the code I’ve tried so…
-
5
votes1
answer590
viewsHow to replace the space character with another one?
The title of the question is to understand that it is simple I ask silly ,but I would not like to know how to replace the space of a EditText by something else ,as in the image below: In the case of…
-
4
votes2
answers10087
viewsChange an Edittext mask at runtime
I have a EditText which is used for CPF and CNPJ. I need to use it time as CNPJ and time as CPF. I need to change the mask at runtime according to the selected type (CNPJ/CPF), but in doing so, a…
-
4
votes1
answer142
viewsEdittexts dependent on an Android Gridview
I have two Edittexts, a discount value, a percentage and an update Imagebutton, all are in a Gridview. When clicking on the Imagebutton, the value entered in the percentage field should be converted…
-
4
votes2
answers5149
viewsCreate a Alertdialog with an Edittext of type "number" - Android
Guys, I have a problem with my alert: In it I have an Edittext, only I can’t declare Edittext with type numbers(android:inputType="number"). Any idea? Follow the code of the Alert: public void…
-
4
votes1
answer271
viewsEdittext issues in a listview
I’m trying to get my listview retain the values placed on EditText, but every time I give one scroll I lose the data or it multiplies to other fields. Can anyone help? Follow below mine adapter:…
-
4
votes7
answers10560
viewsHow to test if an Edittext is empty?
I would like to know how I do to test whether a Edittext is empty or filled on Android. For example, I want to make an app that will perform a registration, but there are fields that cannot be empty…
-
4
votes3
answers219
viewsHow to create a top numeric bar on your Android keyboard
Does anyone know how to create in Edittext XML that number bar on the keyboard?…
-
4
votes1
answer2113
viewsHow do I exchange text in unity3d with a script I can’t remove?
I have a problem in unity3d and I don’t know how to solve. I have a certain script using UnityEngine; using System.Collections; using UnityEngine.SceneManagement; using UnityEngine.UI; public class…
-
4
votes1
answer1039
viewsHow to change the color of the line below Edittext via xml
How to change the color of this line below Edittext via xml?…
-
3
votes3
answers797
viewsHow to consider an empty Edittext as "0"
I’m developing an Android app that calculates 3x3 matrices so I’m 18 EditText, however if I want to multiply a matrix 2x3, 2x2, 1x2, etc. I would have to fill the fields of the matrix size and leave…
-
3
votes2
answers3886
viewsHow to change edittext line color programmatically
I need to change the line color of Edittext programmatically, as I do? I tried to set an xml in the drawable folder, but it does not change the line color anyway...
-
3
votes1
answer404
viewsError in monetary mask, saved with the right digits but at display time 2 digits are missing
Colleagues! When I save the product gets the correct digits as on the screen above. However, when I enter the list of products and click on the product Scissors it opens on the registration screen…
-
3
votes0
answers50
viewsEdittext receiving Null as value, even if it is passing a String with value in it
I am performing the query in Mysql and checking, IF MYSQL =! null, populates some fields of type Edittext. However, it is not possible, as it is giving error that I am passing a null value. As you…
edittextasked 8 years, 5 months ago Gustavo Rezende 31 -
3
votes1
answer715
viewsHow do I create an event when someone types something in Edittext?
I would like to create an event as the user enters some word in my EditText, but I don’t know how to access it.
-
3
votes4
answers3003
viewsAllow uppercase letters only in Edittext
I know I can make the Edittext screen is always rotated, now I want to know if there is a way to only allow uppercase letters at the moment the user is typing something.
-
2
votes2
answers132
viewsEdittext is deleted when use setSelection() within onTextChanged method
I’m trying to put a phone mask on by the method onTextChanged, the text received in this method is coming in reverse, and when I try to put the method setSelection() for the cursor to position at…
-
2
votes3
answers440
viewsWhy does Edittexts information disappear when I change Victoria?
I have a problem in which information such as "name", "address" and "phone" that I type inside the EditText of Activity main disappear when I go to another Activity seek other types of information…
-
2
votes2
answers574
viewsHow can I change the Edittext selection and pointer color?
I want to change the color of seleção of the text in a EditText and also change the color of bolinha (name is pointer if I’m not mistaken) by java. It has to be the same as the image that follows…
-
2
votes2
answers593
viewsHow to prevent the user from typing in Edittext, but allow clicking on it to open a Datepicker?
I have an Edittext that when clicking on it opens a Datepicker, how to prevent the user from typing in Edittext? I tried to use edtData.setEnable(false) but clicking on editText nothing happens.…
-
2
votes3
answers135
viewsEdittext style texts - Underline in Zigzag
I have an edittext that when it detects a specific word it highlights it for example: print("Destaque") The word print will be deployed. Only so far so good but I want every time it detects a…
-
2
votes1
answer3874
viewsChange the edittext and selection color in edittext
I am using a Autocompletetextview and an Edittext, for email and password, respectively. Is it possible to change their color? Here is an image: Change the selection color and the color on the…
-
2
votes2
answers212
viewsWhen I delete the last Edittext character from the PARA app, what to do?
I type a number sequence normally and Talz, now if for example I type "1234" in any of the 3 Edittexts existing in my Activity... ... and delete until the last character, ie when I delete the last…
-
2
votes1
answer1551
viewsHow to make monetary mask on Edit Text Android
Good morning gentlemen, I’m having trouble putting a monetary mask on an Edit Text, I checked several forums and tutorials but no method worked. My project is to basically make the customer put the…
-
1
votes2
answers3645
viewsHow to pass data from an Sqlite table to several Edittext fields
How to take the data from a table and present them each in one EditText? I’m developing on Android. Here I do the List of the data I need: public List<ConfiguracoesSistema>…
-
1
votes1
answer54
viewsTextbox with editing
I have a textbox And I wish I could edit the text on it. For example, I wish that on the website I could write in the textbox the following text: "This is a test!" And that could do, by clicking…
-
1
votes0
answers100
viewsHow to maintain the position of a Listview when an item is changed?
How to maintain my position ListView, containing a EditText, when the value of this EditText is amended? Call from the class that fetches the data in the database: /* Instancia da classe…
-
1
votes1
answer210
viewsRetrieving texts typed in Edittext generated at runtime
In my project I have some Edittext being generated at runtime, the number of Edittext is variable. I need to retrieve the typed text and store it in different variables, then create a Json object…
-
1
votes1
answer93
viewsError summing Edit Text fields using Onfocuschangelistener
I’m trying to get my application to calculate the fields EditText cost price plus profit percentage and when clicking on the sales price field the result already appears, but instead of appearing…
-
1
votes1
answer123
viewsIf and Else problem when validating Edittext fields in the android app
I’m a little confused to do a field validation here on my People Register. The following error appears: Else without if on line 84. I don’t have much experience and I appreciate the understanding of…
-
1
votes1
answer61
viewsPrepend in an Edittext using Textwatcher
How to make a prepend on Android? Currently I do some append, but I didn’t see how to make a prepend at the event onTextChanged. The reason is to put one ( before the first 2 digits of a phone, for…
-
1
votes1
answer107
viewsEDIT TEXT - ANDROID
I have 3 Edit Texts in my project, I have set the maximum d characters for each one, I would like to know how to do for when this reaches the maximum he gives focus to another. Ex: the first one has…
-
1
votes0
answers303
viewsAutocompletetextview display items that have accent when typed without accent
I own a AutoCompleteTextView, defined as your Adapter I have a list that receives the name of cities as, for example, São Paulo, but if I inform you in the field the value Sao Paulo, without the…
-
1
votes3
answers506
viewsHow to get the object focused on Android
Hello to all I have the following Listener below which checks if an editText has been changed, the Listener will be identical to several editText so I would like to get the current editText through…
-
1
votes2
answers620
viewsonClick in edittext that cannot be editable
How to make an event click on an edittext, enabled="false" ? (I couldn’t do it without the focus being on edittext, enabled="true") Or, an event click on an edittext that cannot be editable. Code…
-
1
votes1
answer140
viewsProblem in editText inside a Listview
Hello, I created a list of questions within a Listview, I created all the questions by programming, I’m not doing any components in the.xml layout, I just have a frameLayout, but the moment I click…
-
1
votes2
answers71
viewsAndroid Edittext type number make appear keyboard with numbers and comma
I am working with values in editText and I need the input to be only numbers and comma to floating point. I tried with inputType="numberDecimal" but when opening the keyboard only allows the point…
-
1
votes2
answers1303
viewsPosition text in Textviews and Edittexts with an image as background?
I created a simple app that has only one Textview and a Edittext: As you can see changed the background of both, so far no problem: The problem appears when I insert texts, because they are poorly…
-
1
votes1
answer303
viewsError when comparing an Edittext to a String
I am trying to compare the text inserted in an Edittext with an item in my Arraylist, but the condition is never true. int aux=-1; for (int i = 0; i < lista2.size(); i++) { if…
-
1
votes2
answers369
viewsPassing parameter to another Activity with sharedPreference
I have a code where I will access a webservice that will be changing the ip weekly, I created a sharedpreference for the user to save the new ip and when saving my Activity would pull this IP saved…
android web-service checkbox edittext sharedpreferencesasked 7 years, 2 months ago Renato Crispim 45 -
1
votes0
answers83
viewsKeep your focus on edittext after pressing Enter
I have a barcode reader that does the action of putting the text in edittext and pressing enter automatically, I implemented the function while reading but I would like the focus on edittext to…
-
1
votes1
answer76
viewsAndroid - Detect specific word in an Edittext
How do I make it so that when a button is pressed, it activates a function only if a specific word has been typed at any position in an Edittext? Thank you. main.xml: <EditText…
-
1
votes2
answers101
viewsThe application for when editText is not populated
Hello! I’d like to ask for your help. I’m new to Android studio and I’m trying to create an app for my physics students to calculate motion equations. One of the methods is to calculate the equation…
-
1
votes2
answers1866
viewsFlutter - How to change the size of a Textfield correctly?
I want to leave my Textfield with a specific height, but when the user type a larger text than the field happens that is illustrated in the gif below. There’s no point in reducing the font size.…
-
1
votes1
answer50
viewsSearching Listview using Edittext and Cursor
Good morning guys, I would need to ask a question. I have an application where I have a ListView that pulls the information from the database, and would like to make a search field in which I am…
-
0
votes1
answer130
viewsHow to access the View that triggered one of the events of a Textwatcher?
Explanation: I have a common application where there are several components EditText, where I assign them an Handler that would be this one: TextWatcher handler = new TextWatcher() { @Override…
-
0
votes1
answer88
viewsEdittext Setposition at the end
I am trying to get when I click my Edit the cursor position go to the end of the text, my code is as follows: Script public class DetalhesCompraActivity extends Activity { EditText tb_acrescimo;…
-
0
votes2
answers947
viewsHide keyboard with Fragment
I’m making a mobile app that has screens on Fragment with Drawer, and in them EditText, but I’m having a problem that by clicking on EditText and then click away, or click the menu the keyboard does…