Add and Group Additional Preferences

We’re going to include two new standard Preference items in here, plus two Preference links. All four are Preference objects, but the former two are actually saved by the Preferences library as you expect and the latter two will take the user to new screens. Once we get everything added, the Settings screen will look like this:

images/abl.personalize/settings-final-hazel.png

Add the User Name Preference

The User Name Preference is how we’re going to associate a user with their settings on the API side. It’s not a particularly good approach for a production app, but it’ll at least give you a way to identify users when backing up settings. We’ll cover this ...

Get Kotlin and Android Development featuring Jetpack now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.