Questions tagged as 'edittext'

2
answers

When I delete the last character from EditText's app, what do I 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 ... ...anddeletethelastcharacter,thatis,whenIdeletethelastremainingnumber(inthiscasethe"1" ), the app for:...
asked by 31.01.2017 / 01:01
2
answers

EditText is deleted when I use setSelection () within the onTextChanged

I'm trying to put a phone mask using the onTextChanged method, the text received in this method is coming back, and when I try to put the setSelection () method so that the cursor positions at the end, my EditText is off, in...
asked by 10.11.2014 / 11:37
3
answers

Why does the EditTexts information come up when I change my activity?

I have a problem in which information such as "name", "address" and "phone" that I type inside the EditText of the Activity principal go when I go to another Activity search for other types of information and return to the m...
asked by 14.02.2015 / 15:26
3
answers

Texts style of EditText - Underline on ZigZag

I have an edittext that when it detects a specific word it highlights it for example: print("Destaque") The word print will be highlighted. But until that's fine, I want every time it detects a variable or a word that is wrong acc...
asked by 09.11.2017 / 22:35
3
answers

How to get the object with focus on Android

I have the following Listener below which checks if an editText has been changed, the Listener will be identical for several editText so I would like to get the current editText through the "v" property, to avoid code repetition and create only o...
asked by 12.09.2016 / 16:33
1
answer

Android - Detect specific word in an EditText

How do I when a button is pressed, activate a function only if a specific word has been typed in any position in an EditText? Thank you. main.xml: <EditText android:layout_height="wrap_content" android:layout_width="wrap_content" android...
asked by 16.05.2018 / 18:35
2
answers

Position text in TextViews and EditTexts with an image as background?

I've created a simple app that has only one TextView and one EditText : Asyoucanseechangedthebackgroundofboth,sofarnoproblem: TheproblemappearswhenIinserttext,asitispoorlypositionedinthelayoutofbothTextViewandEditText: Evenindifferentways...
asked by 10.02.2017 / 00:53
1
answer

Error in the comparison between an EditText and a String

I'm trying to compare the text entered 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 (edContato.getText().equals(lista2.get(i))){ aux = i;...
asked by 06.05.2017 / 23:19
2
answers

Passing parameter to another activity with sharedPreference [duplicate]

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 that save my activity would pull that ip saved in the shared preference and would end up...
asked by 29.08.2017 / 20:35
2
answers

How to pass data from an SQLite table to several EditText fields

How do I get the data from a table and display it in a EditText ? I'm developing on Android. Here I make List of the data that I need: public List<ConfiguracoesSistema> listarConfiguracoes() { // List que recebe os da...
asked by 10.04.2014 / 20:02