Search code examples
javaandroidpreferencesandroid-preferences

How can i add some text (i.e. kind of "about" info) in Preferences in Android


I'd like to add a short text (2-3 sentences) to my preferences screen (which is created using xml with PreferenceScreen, etc), in order to provide some kind of short help/description for the user.

I tried using Preference, i.e. custom preference, but i cannot see more than 1 line in the title and more than 2 lines in the summary.


Solution

  • You can't do a lot of customization to a preference widgets.

    Two options:

    1) SMSpopup approach. Opening a new window with the information. Check the About preference. Check the src code.

    2) Softkeyboard approach. Using the normal preference but setting it disabled. Check the src code.