All Projects → pkjvit → Android Multi Theme Ui

pkjvit / Android Multi Theme Ui

Licence: apache-2.0
Android multi theme UI implementation with day night mode. This repository cover theme changes at runtime, user can select theme from pre-defined multiple themes and changes reflect dynamically on the go.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Android Multi Theme Ui

Ibackdrop
A library to simply use Backdrop in your project (make it easy). Read more ->
Stars: ✭ 137 (-3.52%)
Mutual labels:  material-design, android-application, material-theme, android-ui
Materialdrawer
The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.
Stars: ✭ 11,498 (+7997.18%)
Mutual labels:  material-design, material-theme, android-ui
Mediapicker
Easy customizable picker for all your needs in Android application
Stars: ✭ 105 (-26.06%)
Mutual labels:  material-design, android-application, android-ui
Bottomsheet
BottomSheet dialog library for Android
Stars: ✭ 219 (+54.23%)
Mutual labels:  material-design, android-application, android-ui
Shotang App
The New Home Screen is designed in a modular way with the core focus on product discovery. Search, Deals, Products everything has been brought upfront. The hamburger menu has been replaced with a bottom navigation bar for easy reachability. On the tech side too, this design allows us to run new deals and other experiments in an agile manner which wasn't possible in the previous version.
Stars: ✭ 132 (-7.04%)
Mutual labels:  material-design, android-application, android-ui
Morphing Material Dialogs
Material dialog ❤️ morphing animation. An android kotlin UI library for building beautiful animations for converting a floating action button into a material dialog.
Stars: ✭ 806 (+467.61%)
Mutual labels:  material-design, android-application, android-ui
Music Player Go
🎶🎼 Very slim music player 👨‍🎤 100% made in Italy 🍕🌳🌞🍝🌄
Stars: ✭ 654 (+360.56%)
Mutual labels:  material-design, android-application, android-ui
Datingapp
Dating UI kit is used for online meet up with girls and boys . The screen contains more than 30 icons and most of all required elements required to design an application like this. The XML and JAVA files contains comments at each and every point for easy understanding. Everything was made with a detail oriented style and followed by today's web trends. Clean coded & Layers are well-organized, carefully named, and grouped.
Stars: ✭ 97 (-31.69%)
Mutual labels:  material-design, android-application, android-ui
Android Observablescrollview
Android library to observe scroll events on scrollable views.
Stars: ✭ 9,625 (+6678.17%)
Mutual labels:  material-design, android-ui
Material Dashboard
Material Dashboard - Open Source Bootstrap 5 Material Design Admin
Stars: ✭ 9,987 (+6933.1%)
Mutual labels:  material-design, material-theme
Nextjs Material Kit
NextJS version of Material Kit React by Creative Tim
Stars: ✭ 141 (-0.7%)
Mutual labels:  material-design, material-theme
Vsc Material Theme
Material Theme, the most epic theme for Visual Studio Code
Stars: ✭ 1,617 (+1038.73%)
Mutual labels:  material-design, material-theme
Android Inappbilling
A sample which uses Google's Play Billing Library and it does InApp Purchases and Subscriptions.
Stars: ✭ 114 (-19.72%)
Mutual labels:  android-application, android-ui
Vectorifydahome
📱 Minimal app to apply wallpapers from a vast (400+) collection of vector graphics 🙃
Stars: ✭ 119 (-16.2%)
Mutual labels:  android-application, android-ui
Bubble Navigation
🎉 [Android Library] A light-weight library to easily make beautiful Navigation Bar with ton of 🎨 customization option.
Stars: ✭ 1,537 (+982.39%)
Mutual labels:  material-design, android-ui
Cameraxdemo
A sample camera app with CameraX API from Android Jetpack
Stars: ✭ 112 (-21.13%)
Mutual labels:  android-application, android-ui
Keepassdx
📱 KeePass implementation for android with material design and deluxe features
Stars: ✭ 1,395 (+882.39%)
Mutual labels:  material-design, android-application
Teammate Android
A Team Management app for creating tournaments and games for various sports
Stars: ✭ 116 (-18.31%)
Mutual labels:  material-design, android-ui
Fancyshowcaseview
An easy-to-use customisable show case view with circular reveal animation.
Stars: ✭ 1,662 (+1070.42%)
Mutual labels:  material-design, android-ui
Todayx
🌈Flutter App:🎊「今日份的X」(每天推荐一个:图片、诗歌、名言、音乐、乐评、高等数学、两种配色、化学方程式、Github Repo、知乎问题、文章)
Stars: ✭ 128 (-9.86%)
Mutual labels:  material-design, android-application

Android-Multi-Theme-UI

This example cover Android multi theme UI implementation with day night mode.

Custom Date Picker

Screen Shots

Day Night Mode

Appcompat has come with a new theme family Theme.AppCompat.DayNight.

It has four modes :

  • MODE_NIGHT_NO : the day (light) theme.
  • MODE_NIGHT_YES : the night (dark) theme.
  • MODE_NIGHT_AUTO : day/night mode change according to time.
  • MODE_NIGHT_FOLLOW_SYSTEM (default). this mode uses system night modes settings to determine if it is night or not.

Easy to use

  1. Your theme must uses Theme.AppCompat.DayNight
<style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/primaryColorAmber</item>
    <item name="colorPrimaryDark">@color/primaryDarkColorAmber</item>
    <item name="colorAccent">@color/secondaryColorAmber</item>
</style>
  1. Your activity must extends AppCompatActivity to change day/night mode at runtime.
getDelegate().setLocalNightMode(AppCompatDelegate.MODE_NIGHT_YES);

Multi Theme

It's very easy to change theme at runtime in android.

  1. First you need to create some well defined themes in xml-styles.
<!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/primaryColorAmber</item>
        <item name="colorPrimaryDark">@color/primaryDarkColorAmber</item>
        <item name="colorAccent">@color/secondaryColorAmber</item>
    </style>

    <style name="AppTheme.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>

    <style name="AppTheme.RED" parent="AppTheme.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/primaryColorRed</item>
        <item name="colorPrimaryDark">@color/primaryDarkColorRed</item>
        <item name="colorAccent">@color/secondaryColorRed</item>
    </style>

    <style name="AppTheme.PINK" parent="AppTheme.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/primaryColorPink</item>
        <item name="colorPrimaryDark">@color/primaryDarkColorPink</item>
        <item name="colorAccent">@color/secondaryColorPink</item>
    </style>
  1. To change theme at runtime use following code in your base activity onCreate() method and just before setContentView().
// To change theme just put your theme id.
int theme = getThemeFromPreferences(); // R.style.AppTheme_RED
setTheme(theme);
  1. To change theme of your setting/preference activity (from where you are changing theme) you need to recreate that activity by calling following method of that activity.
//store your theme id in preference
saveThemeInPreferences(R.style.AppTheme_RED);
//recreate this activity to see changes
SettingActivity.this.recreate();

Licence

Copyright 2018 Pankaj Jangid

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].