Dark And Light Theme In Android App | Android Studio Tutorial 2020 | Simple Method

Solo Techky
Solo Techky
18.8 هزار بار بازدید - 4 سال پیش - This video shows you how
This video shows you how you can set dark theme in your android application.
Also implementing the functionality to switch between dark, light and system default theme.
From (Android 10) and above versions we have settings to set dark models it is necessary to make your app support both light and dark mode for better user experience.

So As the android official documentation, these are the three ways to enable Dark theme in Android 10 (API level 29) and higher:

- Use the system setting (Settings - Display - Theme) to enable Dark theme.
- Use the Quick Settings tile to switch themes from the notification tray (once enabled).
- On Pixel devices, selecting the Battery Saver mode enables Dark theme at the same time. Other     OEMs may or may not support this behaviour.

Get project source code :  https://github.com/solotechky/DarkTheme

Dependencies and plugins used in project:
- dependencies {
     implementation 'com.google.android.material:material:1.2.1'
  }
- plugins{
       id 'kotlin-android-extensions'
   }

Subscribe to this channel:
@solotechky9548

HAPPY CODING...

#android #darktheme #androidstudio
4 سال پیش در تاریخ 1399/09/24 منتشر شده است.
18,862 بـار بازدید شده
... بیشتر