Questions tagged [dialog-preference]

A class in the Android preferences framework that allows applications to implement custom user interfaces for editing a preference setting.

A class in the Android preferences framework that allows applications to implement custom user interfaces for editing a preference setting.

A very useful guide for writing DialogPreference implementations can be found in this answer: Concise way of writing new DialogPreference classes?

67 questions
0
votes
1 answer

DialogPreference constructor sets onPreferenceClickListener?

I have set an onPreferenceClickListener on my subclass of DialogPreference like so: public class SeekBarDialogPreference extends DialogPreference { ... public void show() { onClick(); } } public class TopPage extends…
gobernador
  • 5,659
  • 3
  • 32
  • 51
0
votes
1 answer

Media Volume controller in DialogPreference

I am trying to control media volume But always it automatic set to zero after closing dialog. code : DialogPreference dp = (DialogPreference)findPreference("mediavolume"); dp.setOnPreferenceChangeListener(new…
Sunny
  • 14,522
  • 15
  • 84
  • 129
0
votes
2 answers

Remove icon of DialogPreference appearing on PreferenceActivity screen

Does anyone know how to remove the icon of DialogPreference appearing on PreferenceActivity screen? The icon having down arrow bounded inside a circle (▼), which appears on the preference list. Similar question to this one: Android: How to remove…
Pete Houston
  • 14,931
  • 6
  • 47
  • 60
0
votes
0 answers

Migrating from android.preference.DialogPreference to androidx.preference.DialogPreference is causing issues

This is the TimePreference class which extends DialogPreference import android.content.Context; import android.content.res.TypedArray; import androidx.preference.DialogPreference; import android.util.AttributeSet; import android.view.View; import…
0
votes
2 answers

DialogPreference is not saving the preference when I expect it to?

I have written a bare bones standard DialogPreference which is working fine, except that it is not saving the preference to default shared preferences when I expected it to. 1) open the app, and main activity shows value of foo from default shared…
nobody special
  • 445
  • 4
  • 16
0
votes
1 answer

Custom DialogPreference not showing ImageView properly

I have a custom DialogPreference: The…
berlusca
  • 119
  • 2
  • 9
0
votes
0 answers

defaultValue returned as empty string for Custom Preference class used in Preference XML

I am trying to create a time selection preference by extending the DialogPreference. I have specified a android:defaultValue in the Preference XML. Everything works well, but when I try to read the value of the preference from code, I get an empty…
0
votes
1 answer

Default value not setting with custom DialogPreference and bindPreferenceSummaryToValue

I made a custom DialogPreference to have a seekbar dialog in my settings, bound its summary to its value with bindPreferenceSummaryToValue method provided by default with a Setting Activity. (see the one below) Everything is working fine, however…
Nicolas
  • 6,611
  • 3
  • 29
  • 73
0
votes
1 answer

Show the sharedPreference dialog variable on settings screen

I know this is a simple thing but I can't find a way to do this right. I might have designed it wrong for all I know. I have a PreferenceFragment that the user can navigate to using the options menu on the main fragment in my app. (My app has only…
0
votes
1 answer

Custom DialogPreference disappears after orientation change

First of all, sorry for my english. I'm trying to make a custom 'day picker' dialog on my preference screen. I got the codes from Android Developer site and from Stackoverflow. The dialog works 'well', it saves and loads the value (the layout…
wyzard
  • 543
  • 5
  • 17
0
votes
1 answer

Android save and show user preferences using custom DialogPreference

I'm trying to print the value of a editText in my preferenceActivity, and for that I'm using a custom DialogPreference so the user can enter the price to filter and when he clicks "ok" it should print the filtered price in the activity. But when I…
0
votes
2 answers

Android YesNoDialogPreference

You may think this is a duplicate question but i looked up almost every existing answer and i still did not get it right. Here is my question: I want to create a default YesNoDialogPreference by extending the DialogPreferenceclass Creating a…
Bisho
  • 5
  • 4
0
votes
1 answer

OnClickListener not responinding when in DialogPreference List

I have a dialog preference for the fonts used in my app. The basic layout is a ListView where each row consists of a textView showing a preview of the font, and a radio button that indicates which font is currently selected. I want the user to be…
0
votes
1 answer

Using a dialog preference with custom layout

I have a custom layout that I am using with a dialog preference, and the layout appears fine in the dialog box but the problem is that I have check boxes in the layout, and checking them doesnt make them behave as expected. Below is the code of my…
ez4nick
  • 9,756
  • 12
  • 37
  • 69
0
votes
1 answer

Custom Dialog preference with RadioGroup

What I am trying to accomplish is a dialog preference that I have my own layout in. My layout is just a radiogroup with 4 radio buttons. The problem I am having is I am not sure in which method of my DialogPreference.java file I can actually do…
ez4nick
  • 9,756
  • 12
  • 37
  • 69