Questions tagged [preference-v7]

v7 Preference Support Library: Is one of the packages that added by google in order to provide better backwards compatibility for developers. This package introduced on August 2015.

14 questions
115
votes
13 answers

PreferenceFragmentCompat requires preferenceTheme to be set

With the new PreferenceFragmentCompat from the v7 Preference Support Library: http://developer.android.com/tools/support-library/features.html#v7-preference, I get this error E java.lang.IllegalStateException: Must specify preferenceTheme in…
28
votes
2 answers

Installing a support library for PreferenceFragmentCompat

I'm new to Android Studio and a total beginner at Android programming in general. I looked and looked and I couldn't find the right thing to do. All I want is to install a library to use PreferenceFragmentCompat or any class that replaces…
siriuseteor77
  • 1,004
  • 2
  • 12
  • 30
25
votes
8 answers

Inner PreferenceScreen does not open with PreferenceFragmentCompat

My inner PreferenceScreen of PreferenceFragmentCompat is not showing, or seems to ignore tapping events. I created MyPreferenceFragment that extends PreferenceFragmentCompat public class MyPreferenceFragment extends PreferenceFragmentCompat { …
17
votes
2 answers

HowTo use support.v7.preference with AppCompat and potential drawbacks

I was trying to implement preferences for an AppCompat app, using support.v7.preference. It took me a couple of days to fiddle through it, since support.v7.preference has some significant differences to the native preferences... which isn't too bad…
11
votes
2 answers

How to move back from Preferences subscreen to main screen in PreferenceFragmentCompat?

I am trying to implement a Settings screen using PreferenceFragmentCompat. My preference xml has a preference subscreen like this: preferences.xml
Arpit Jaiswal
  • 123
  • 1
  • 6
6
votes
1 answer

Android - custom row layout in my ListPreference

In my Android application, I have implemented class SubtitleColorListPreference which extends from ListPreference. I need this, because I need to set my own layout for each item in list. Everything works fine and it looks like this: The important…
PetrS
  • 1,110
  • 14
  • 38
5
votes
4 answers

PreferenceFragmentCompat crashes on initalization

I have made an application with a ViewPager. Everything is working fine, when I make a debug build, and test it on my phone. (Not emulator) But when I build a release .apk and install it, the PreferenceFragmentCompat's…
2
votes
0 answers

Android - change preference category color on marshmallow

I want to change v7 PreferenceCategory text and divider color. I have recently viewed this question: PreferenceFragmentCompat requires preferenceTheme to be set and I've added this to my style:
Montoya
  • 2,819
  • 3
  • 37
  • 65
2
votes
1 answer

PreferenceFragmentCompat padding issue with @style/PreferenceThemeOverlay

While using the default PreferenceThemeOverlay from the preference-v7 support library (version 23.1.0) I ran into the following issue. Starting from API 22 my PreferenceFragmentCompat had an ugly additional padding added to the left and right side…
1
vote
0 answers

Not able to inflate a layout from preference screen layout

For my preference screen xml, I want to inflate a custom layout. Here is my preference screen xml:
Sushil
  • 8,250
  • 3
  • 39
  • 71
1
vote
0 answers

PreferenceFragmentCompat not found on Eclipse

Android already has a library to support PreferenceFragment in older versions. I'm not using Android Studio so I can't add to the gradle: com.android.support:preference-v7:23.0.0 I already have the latest version of the support library 23.0.1, but…
Heraldo
  • 141
  • 6
0
votes
0 answers

ActivityPreference does not use Right-to-Left resources when locale changes

I'm currently developing an application which supports 3 languages base on Yaroslav Berezanskyi codes. It's great and I can change application language at runtime but there is a problem which has confused me. Unfortunately when I want to go to…
Mohsen Hatami
  • 317
  • 3
  • 14
0
votes
0 answers

Error inflating class for custom preference

I'm trying to use some preference classes which were written by hidron. I added SpinnerPrefence class to preference.xml but I run the app it gives me the error of InflateException. The question is why I get this error!! I checked package name in xml…
Mohsen Hatami
  • 317
  • 3
  • 14
0
votes
1 answer

PreferenceFragmentCompat issues

There seems to be alot of issues using PreferenceFragmentCompat. I have set the PreferenceThemeOverlay. But however, it seems that the Titles are too big. The EditTextPreference tag can't understand inputType. In general. It doesn't seem to have…