Questions tagged [preference]
445 questions
15
votes
5 answers
how to hide the divider between preferences in fragment
I want to hide the divider between preferences in fragment.
The code is below:
1.SettingsActivity.java
public class SettingsActivity extends PreferenceActivity {
super.onCreate(savedInstanceState);
SettingsFragment settingsFragement = new…

soildong
- 151
- 1
- 4
14
votes
5 answers
Android: How to adjust Margin/Padding in Preference?
Before I asked to remove the padding of the PreferenceActivity/PreferenceFragment:
Android: How to maximize PreferenceFragment width (or get rid of margin)?
This time I having trouble adjusting margin/padding before Title Text. (See image…

jclova
- 5,466
- 16
- 52
- 78
14
votes
7 answers
SharedPreferences will not save/load in PreferenceActivity
EDIT: The problem described below was due to a very peculiar device issue not caused by any coding-related problem.
I have a preferenceActivity in which I have many checkBoxPreferences.
The checkBoxPreference is suppose to save the the default…

Reed
- 14,703
- 8
- 66
- 110
14
votes
2 answers
Customizing the layout of a PreferenceScreen
My requirements
Note: I need to support Android API 15 and onwards.
In my PreferenceFragment I am dynamically adding PreferenceScreen's to a PreferenceCategory.
PreferenceScreen as = mgr.createPreferenceScreen(context);
as.setTitle(name);…

se22as
- 2,282
- 5
- 32
- 54
13
votes
4 answers
Android PreferenceScreen title in two lines
I have PreferenceScreen with long title especially in some languages. I'm able to set multiple lines title for CheckBoxPreference or ListPreference with this:
Android preference summary . How to set 3 lines in summary? , but how to set 2-lines…

Miroslav Michalec
- 1,569
- 1
- 19
- 22
13
votes
2 answers
Android preference summary . How to set 3 lines in summary?
Summary of preference is allowed only 2 lines .
If I want to display 3 lines or more in summary . How can I do ?

kikura
- 185
- 2
- 11
13
votes
4 answers
How make a ListPreference with checkbox
How can I create a ListPreference with checkbox?
I know how to use ListPreference, but I need multiple selection like in Alarm application on "repeat" preference.
like this screenshot:

Tek Yin
- 3,011
- 3
- 25
- 42
13
votes
2 answers
Allow JavaScript from Apple Events in Safari through Terminal Mac
I'm writing a program that executes do javascript in Safari. The only problem is that I'm trying to make the app give its self permission to do it. I'm trying to locate the file that handles the Safari developer preferences so that I can do this.…

Levi Muniz
- 389
- 3
- 16
13
votes
2 answers
Change Preference Item Summary Text Color in Android 4
I have the below sample of preference items
I use a theme in the res/values to change the Summary text color