android-preferences Questions
4
I created a preference entry inside preference screen, which looks like this:
<PreferenceScreen>
<Preference
android:title="title"
android:key="key"
android:widgetLayout="@layout/some...
Griff asked 24/3, 2012 at 9:22
4
Solved
I have Listpreferences in my app. They don't appear to be setting to their defaults right after installation - they appear to be null. I'm trying to figure out why my default preferences are not be...
Machismo asked 1/5, 2010 at 21:0
14
Solved
The textColor attribute isn't working. Here's my XML:
<PreferenceCategory
android:title="Title"
android:textColor="#00FF00">
Any ideas?
Earsplitting asked 23/7, 2012 at 6:16
3
Solved
setTargetFragment() is deprecated in Java, and I don't understand the correct replacement for it as android documentation uses it and is outdated. I believe the FragmentManager is the correct repla...
Jersey asked 17/11, 2020 at 4:48
36
This must come up very often.
When the user is editing preferences in an Android app, I'd like them to be able to see the currently set value of the preference in the Preference summary.
Example:...
Keratitis asked 10/2, 2009 at 8:2
3
Solved
I'm trying to use the Android Jetpack Settings guide with a toolbar. The guide says that the root tag to be <PreferencesScreen>, so I can not include the toolbar in the xml. I'm using a NoAct...
Mandamandaean asked 23/11, 2020 at 15:20
3
Solved
I am populating parts of my preferences programmatically. This works fine. Unfortunately new preferences there has to be added, when the user changes some preferences (think of an 'add a new alarm'...
Rapeseed asked 4/4, 2017 at 21:42
4
Solved
I have two apps containing a preference section, and i'm using the preference library, the latest version available at the time of writing:
implementation "androidx.preference:preference:1.2....
Fishmonger asked 10/1, 2022 at 9:15
2
Solved
SwitchPreferenceCompat still retains the old Switch style, I know to be able to style it Material 3 in the following way:
theme.xml
<style name="Theme.Material3.Preference" parent=&quo...
Hootenanny asked 18/11, 2022 at 9:17
7
Solved
Is there a way to dynamically show and hide preferences? In my case, I have a checkbox preference that would disable or enable one of 2 preference groups ("with-" and "without-handicap" groups). Wh...
Zygapophysis asked 16/1, 2011 at 2:54
2
Solved
So i'm updating my apps to fully support Monet and Material You guidelines, and the official site mentions a new design for the switches. I used it, and that's the result:
I have a preference scre...
Siberia asked 7/9, 2022 at 16:56
4
Solved
I want to support at least api 10, I want to be able to style my preferences nicely, I want to be able to have headers (or to show PreferenceScreens). It seems that PreferenceActivity, not fully su...
Paulson asked 17/9, 2015 at 1:50
2
I have multi-pane view with left and right fragment. On right fragment am launching a PreferenceFragment. Problem is the fragment looks completely distorted without any style. Is there a way to app...
Readymix asked 30/1, 2014 at 17:26
6
Solved
I have a SettingsActivity which extends PreferenceActivity to show settings in my app.
There is a back arrow, but it is not working.
Here's SettingsActivity.java file's code:
public class Setti...
Uveitis asked 5/4, 2016 at 17:36
2
Solved
I’m new to Android development and I’m about to implement simple Preferences for my app. It appears SharedPreferences is a dead end and has lots of warts, so I’m looking at DataStore (non-Proto) vs...
Mandle asked 4/11, 2020 at 23:37
7
Solved
So I've been trying to create a settings activity using androidx.preference.PreferenceFragmentCompat and it's all working fine.
However for some reason there is some padding present on both the pre...
Kapoor asked 25/7, 2018 at 12:20
5
Just for extending CheckBoxPreference or SwitchPreference on Android Lollipop, the widget (the checkbox or the switch) won't have animation anymore.
I'd like to extend SwitchPreference to force ap...
Thorn asked 19/5, 2015 at 21:40
2
Solved
I want to update my preference summary and I found something called SimpleSummaryProvider here. But In my case, it's saying that cannot find attribute app:useSimpleSummaryProvider and in Java code,...
Algology asked 11/12, 2018 at 10:22
11
Solved
i need to set the defult value for a ListPreference when the Activity starts.
I've tried with ListPreference.setDefaultvalue("value"); but it makes the firts Entry of the List as default. I need it...
Ellaelladine asked 4/3, 2011 at 17:34
6
Solved
I have a very simple question:
I have a EditTextPreference dialog which I want to use for getting the user's password and I want it to be masked.
How can I do that?
Exempt asked 28/5, 2011 at 21:24
5
Solved
I've just had to change to using PreferenceFragmentCompat for implementation of permissions checking which means using the support version of EditTextPreference. Unfortunately it seems getEditText ...
Sigmund asked 9/9, 2015 at 10:59
6
Solved
I'm trying to store a set of strings using the SharedPreferences API.
Set<String> stringSet = sharedPrefs.getStringSet("key", new HashSet<String>());
stringSet.add(new_element...
Duplex asked 25/12, 2012 at 23:51
4
I have set flat icon for all my Preference, I would like to change the color of that icon globally.
When I try the below code it even changes the back button color in the toolbar.
I want only P...
Going asked 16/3, 2017 at 3:53
1
Is there a way to gain add a Content Description to the View representing a Preference in a PreferenceFragment or PreferenceActivity?
Basically I need a way to obtain a handle on the View represen...
Sordid asked 9/10, 2014 at 0:1
4
Solved
Background
I'm making an app that has some settings, and I want to use the built in PreferenceActivity or PreferenceFragment for the job
The problem
Some of the preferences have a long title whi...
Montserrat asked 6/4, 2013 at 17:15
1 Next >
© 2022 - 2024 — McMap. All rights reserved.