Questions tagged [edittextpreference]

120 questions
4
votes
1 answer

Getting value from edittext preference in preference screen

I'm new to android development. I just heard about preference screen in android. So I just made one. This is just to enter name in a dialog.
4
votes
2 answers

EditTextPreference.setText(value) not updating as expected

I'm trying to prevent the user from entering an empty string into an EditTextPreference (in the example, catName). I use a OnPreferenceChangeListener to detect when a change is made to the EditTextPreference, and if there is a change and the string…
3
votes
4 answers

EditTextPreference inputType=textPassword not working

I've created a SettingsActivity with the template and put an EditTextPreference in my root_preferences.xml. It should contain a password, so I edited it like this:
fabipfolix
  • 107
  • 1
  • 8
3
votes
2 answers

Change text size on the positveButtonText in the EditTextPreference dialog

I cannot figure out how to change the text size on the buttons in the EditTextPreference dialog popup box. I would like all my text throughout my app to be streamlined at 24 sp. This is happening everywhere except this dialog box from the…
tzg
  • 616
  • 1
  • 8
  • 17
3
votes
1 answer

How to touch EditTextPrefences from another activity or another thread

i have a setting Activity that store name , by changing the name it must first send that to my server and if its store in server successfully then it should set in the summary of my EditTextPreference . everything works fine but at the end i cant…
3
votes
2 answers

Unable to set Single Line on Support library EditTextPreference

I am currently using the support library version of EditTextPreference and I am unable to make the edit text dialog to be single line. Below is my code taken from settings.xml:
3
votes
4 answers

EditTextPreference single line

Is there anyway to make an EditTextPreference single line? I think that there is no property by default, that can do that. Is necessary to rewrite the object? Anyone have this done?
Mun0n
  • 4,438
  • 4
  • 28
  • 46
3
votes
1 answer

EditTextPreference always showing default summary when loaded android

I have a preference fragment which has some EditTextPreference items on them. Every time i load the preferences fragment the values displayed are the default values and one the ones stored in sharedPreferences. How can i get these edit texts to…
3
votes
1 answer

PreferenceActivity, hide the length of the password in EditTextPreference

My actions: I click on EditTextPreference A window appears with the password All is well, but you can see the previously entered length of password How I can hide the length of the password?
3
votes
1 answer

How to open EditTextPreference on open preference screen

I want to open EditTextPreference when I open Preference screen. I try mLabel = (EditTextPreference) findPreference("labelKey"); mLabel.getDialog().show() // this does not work. getDialog return null mLable.getEditText().requestFocus(); // this…
Kolesar
  • 1,265
  • 3
  • 19
  • 41
3
votes
0 answers

Custom layout for EditTextPreference with null validation in custom dialog

I have PreferenceActivity in my app and I want to specify custom layout for EditTextPreference. I do it in an xml file with android:layout attribute. All is OK, the layout is getting changed but I can't change any value of its fields. The code is…
2
votes
2 answers

Changing the Title and EditText color in androidx.preference.EditTextPreference

I have found some similar questions on this topic but it works for support version and not on androidx. I wasn't able to make this change on androidx. But on the previous support version there are solutions for it already. Can anyone give me some…
Kidus Tekeste
  • 651
  • 2
  • 10
  • 28
2
votes
0 answers

Android EditTextPreference default value not shown

I have a XML PreferenceScreen that holds an EditTextPreference like below If the user has not set…
Daniel Jørgensen
  • 1,183
  • 2
  • 19
  • 42
2
votes
2 answers

AndroidX: Set Enter key to validate EditTextPreference dialog box

I'm trying to make a preference screen with AndroidX, but I'm encountering a small problem... When I validate my entry with the "OK" button on the virtual keyboard, the preference is not validated. (keyboard is hidden, that's all...) With AndroidX,…
2
votes
0 answers

Android - Style the input text color of sub-dialog of EditTextPreference in XML

Basically what this question is asking, but in XML: Change EditTextPreference dialog input text color The accepted answer is to write a whole class and edit each single element manually. This can't be the only solution. There must be some way to…
Big_Chair
  • 2,781
  • 3
  • 31
  • 58