Save Settings in Shared Preferences Android Studio Tutorial
Автор: Code With Cal
Загружено: 2021-05-22
Просмотров: 17625
Описание:
How to save user settings in shared preferences using android studio and java. Example persistent settings page android app development.
In this beginner friendly tutorial, we create a simple settings page with a switch that allows the user to select from a dark theme and a light theme. We then store that information as a string in shared preferences, on the apps close and re open we retrieve the setting and update the activity view accordingly.
In this tutorial we store theme as a string but the basic principles of storing an retrieving values from shared preferences could be used for any variable of any type i.e boolean, float double etc..
Shared Preferences Source Code:
https://github.com/codeWithCal/Shared...
⏱️ TIMESTAMPS ⏱️
00:00 - Intro
00:32 - XML Layout
01:42 - User Settings Java
02:34 - Android Manifest
02:41 - Main Activity
#SharedPreferences #AndroidStudio #AppDevelopment
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: