Questions tagged [edittextpreference]
120 questions
1
vote
1 answer
How to get EditTextPreference reference in main activity android
How can I get a reference to my EditTextPreference in my main activity?
I have tried this:
EditTextPreference mEditTextPref =(EditTextPreference) findPreference(incrementby);
but its giving me this error;
incrementby cannot be resolved to a…
user4358262
1
vote
1 answer
Custom layout for Dialog and EditTextPreference
i want to style dialogs in my app to have something like this:
https://i.stack.imgur.com/a3BAe.png
And i'd want this style also for edittextpreference in preferencescreen and all dialogs in my app.
I search a long but find no solution. Hope anyone…

Pietro Avolio
- 25
- 1
- 4
1
vote
3 answers
Error Cannot be cast string to integer
I can't change the EditTextPreference value from string to int. I've done in this way:
WifiOnOffValue = (EditTextPreference) findPreference("WifiOnOffValue");
String value = WifiOnOffValue.getText().toString();
if(value != null && !value.isEmpty())…

Atlas91
- 5,754
- 17
- 69
- 141
1
vote
3 answers
Store/Save & Retrieve to/from SharedPreference Failure
I've been having so much problem with this Live Wallpaper.
I have read alot online about these, and I thought I understood and got them.
When I tried to apply them to this live wallpaper, everything has been going very rough.
I've spent all day and…

Dante
- 465
- 2
- 12
1
vote
1 answer
EditTextPreferences Validation
Can anyone tell me what is wrong with this code. For some reason the OnSharedPreferencesChanged is not being called when changing the value. I am trying to check if the PIN entered is equal to 2 digits or no. But for it just doesnt work..
can anyone…

user2511882
- 9,022
- 10
- 51
- 59
1
vote
3 answers
How to get updated text value from EditTextPreference - it gets old value
I am trying to setup a new password using EditTextPreference. In this Android 4.0.3, clicking the EditTextPreference opens a dialog window where user can enter text. However, on pressing ok, it still shows the old text value and not the newly…

zeeshan
- 4,913
- 1
- 49
- 58
1
vote
1 answer
Security feature: EditTextPreference no bigger then 100?
Is it possible in Android to limit what is the maximum and minimum number that user can input in EditTextPreference?
user2205288
1
vote
2 answers
custom EditTextPreference: can't get TextView by id
I have created a custom EditTextPreference:

haythem souissi
- 3,263
- 7
- 50
- 77
0
votes
0 answers
how to create underline in the PreferenceCategory for separating EditTextPreference
i need the Underline after every EditTextPreference UI for the separating it .
Code
enter image description here
enter image description here
adding Image for better understanding
enter image description here
i have create layout .xml style and to …

Aasann Tiwari
- 1
- 1
0
votes
0 answers
How can i receive a report error message when report error button is clicked
enter image description hereGood day everyone, please i am developing an Android application in android studio. The problem here is how can i receive report error message problems whenever my android app user wants to make a complain…

Emyodil
- 1
- 1
0
votes
1 answer
How to get the link in EditTextPreference and update the link saved in SharedPreferences?
My preferences.xml and My Class in MainActivity.

Diogo Santos
- 61
- 1
- 2
0
votes
2 answers
Why is my positive and negative button text in EditTextPreference not showing up?
So I have a preference screen that has an edittextpreference. I've also set the text of the positive button and negative button of it in the XML file as follows:

Brian Mohammed Catraguna
- 97
- 1
- 10
0
votes
1 answer
How to accept more than one value from Android Text Preference?
Below is the code i used to accept username and password from text preference. Problem is i have to accept first username save it and then password. Is there any easier way to aceept both username and password at the same time on one click . may be…

tomtom
- 345
- 2
- 15
0
votes
1 answer
Add a neutral button to androidx EditTextPrefence / DialogPreference
I have been using my own preference class derived from EditTextPreference to include a neutral button (so that the user can select a default value).
I did this by overriding onPrepareDialogBuilder (from searching stackoverflow of course.
)
override…

Red wine
- 162
- 2
- 11
0
votes
1 answer
How to make a normal lines numbering in EditText?
I am making a text editor for Android and I would like to show the number of every line in theEditText.
My solution was to make a TextView with lines numbers and place an EditText next to TextView. Like this

Dima Bukharev
- 41
- 4