Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid FragmentPreference and ViewPager
    primarykey
    data
    text
    <p>Hi i have set up a view pager and fragments for each page and that's all working as it should however i can not get a preference screen to show on one of my pages no matter what i try.</p> <p>My fragment that i'm trying to add a preference screen looks like this</p> <pre><code>public class Extras extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View V = inflater.inflate(R.layout.extras, null, false); return V; } } </code></pre> <p>So then i read the documentation on PreferenceFragments here <a href="http://developer.android.com/reference/android/preference/PreferenceFragment.html" rel="nofollow noreferrer">http://developer.android.com/reference/android/preference/PreferenceFragment.html</a></p> <p>But when i add this in my Extras class as the above link shows</p> <pre><code>public static class Extras extends PreferenceFragment { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.preferences); } } </code></pre> <p>I error out just extending PreferenceFragment errors in my view pager i read the below link though that PreferenceFragments aren't part of the compatiblity library which i believe is my issue. So is it possible to add a preference screen in one of my pages in my viewpager or is this something i'm going to have to do with a listview and basically make my own preference screen</p> <p><a href="https://stackoverflow.com/questions/5501431/was-preferencefragment-intentionally-excluded-from-the-compatibility-package">Was PreferenceFragment intentionally excluded from the compatibility package?</a></p> <p>Thank you for any help with this issue</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload