androidpreferenceslistactivitypreferenceactivity

PreferenceActivity with TextItems


I'd like to use PreferenceActivity for my games settings. But I'd like to add to that list, so that after the settings items in the list, there would be just text items like "MyGame, version 0.1" or clickable text item "Rate my app" etc.

What's the "correct" or most straighforward way of doing this? I know I can specify a custom layout xml with ListView in it and populate that with the preferences but I'd like to have my custom (clickable) text items in that ListView too, or atleast appear like they were in that list.


Solution

  • What I tried to tell was that I needed what is shown as "Costum Preference" [sic] in this picture:

    custom preference
    (source: kaloer.com)

    You can create it just by using

    <Preference
        android:title="Custom Preference"
        android:summary="This works almost like a button"
        android:key="customPref" />
    

    This example I found from: http://www.kaloer.com/android-preferences