Questions tagged [support-preference]

Android v7/v14 Preference Support Library

v7 Preference Support Library

The preference package provides APIs to support adding preference objects, such as CheckBoxPreference and ListPreference, for users to modify UI settings.

7 questions
53
votes
5 answers

How to use the v7/v14 Preference Support library?

Together with the M release, there are new support libraries. One of them that seems to be very useful is the v7 Preference Support library. It does not seem to have PreferenceActivity or something similar, how do we integrate it to our app?
Randy Sugianto 'Yuku'
  • 71,383
  • 57
  • 178
  • 228
5
votes
6 answers

Can't get PreferenceFragmentCompat to work

I am trying to create an Activity that extends AppCompatActivity and has two fragments inside of it (one below another - just by using a LinearLayout). I would like the first fragment to extend the PreferenceFragmentCompat class from the support-v7…
4
votes
1 answer

preference-v14 ListPreference uses the default color for the radio buttons

I'm using the preferences-v14 support library. When I use ListPreference, the radio buttons are colored not according to the accent color of my theme (when running on Android 5.1). When in Android 4.1, the radio buttons become black. How to make the…
Randy Sugianto 'Yuku'
  • 71,383
  • 57
  • 178
  • 228
2
votes
0 answers

Layout Editor "Design" button missing for v7 PreferenceScreen

Normally when editing a preferences.xml file in Android Studio, one can switch to the layout editor by clicking on the "Design" button at the lower left of the screen: After clicking the button, the layout editor is shown for this xml file: But…
2
votes
1 answer

SwitchPreferenceCompat On/Off animation causes left alignment

When I touch a switch, all other switches look normal like below: But the switch that is just touched aligns left like below: I'm using the following library for preferences screen: com.android.support:preference-v14:25.3.0 With these…
Sait Banazili
  • 1,263
  • 2
  • 12
  • 27
0
votes
1 answer

PreferenceCompatFragment null pointer when setting OnSharedPreferenceChangeListener

I'm using mentioned PreferenceCompatFragment in my code but I have a problem with setting listener on changing settings. I have made an implementation of OnSharedPreferenceChangeListener in my Activity so I have tried to set mentioned listener in a…
Robert
  • 1,272
  • 4
  • 21
  • 40
0
votes
1 answer

VerifyError with PreferenceFragmentCompat

I am trying to use the Support v7 PreferenceFragmentCompat, but when I launch the app I get this VerifyError at the creation of its object instance: E/AndroidRuntime(21575): java.lang.VerifyError:…
Zanna
  • 676
  • 9
  • 13