I’m looking for a way to provide an additional line or two of text (in a smaller than usual font), in some of settings form components in my app. Such an additional text is referred to as ‘secondary text’ in many places in Android design guide (e.g. here: http://developer.android.com/design/patterns/settings.html).
However, I cannot find any way to specify it in components, such as TextView or Checkbox.
I’m sorry, but as a new user, I’m not allowed to post pictures here. The examples can be found in the Design Guide linked above 🙂
Thanks 🙂
The ‘secondary text’ is known as the summary.
So in xml you could have
where
This would give you a checkbox in preferences
You can change this in code with the .setSummary(CharSequence summary) method, which is available for ListPreference and CheckBoxPreference.