Our app has some SwitchPreferences which are difficult to describe within the ~ 20 characters to the left of the Off/On switch.
I see lots of Q&A's that discuss modifying characteristics of preferences. E.g. How can I change font size in PreferenceScreen
The answers involve referencing a layout from the preference(s) to be altered.
What would a layout look like, to change the display of a SwitchPreference, so that the title could use the full width of the screen? (With the text above or below the Off/On Switch)
Or is there a different widget that would have more room for explanatory text?
                        
(Thanks to CommonsWare's comment above)
For most
Preferences, put additional detail inandroid:summary.Ex:
For a
SwitchPreference, usually it is sufficient to describe theOnstate, with theOffstate implicitly being the negation of that. In this case, can useandroid:summary, like any otherPreferencerather than needingsummaryOnandsummaryOff.HOWEVER, If, as in my case, there is slightly different explanation desired for each of the On and Off cases of a
SwitchPreference, then the additional description must be appended to both the On and Off summaries:where file
values/strings.xmlcontains the mentioned strings.