A library that facilitate the ability of changing the app theme with single line of code
JitPack is a novel package repository for JVM and Android projects. It builds Git projects on demand and provides you with ready-to-use artifacts (jar, aar).
To integrate TapThemeManger into your project add it in your root build.gradle
at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
implementation 'com.github.Tap-Payments:TapThemeManger-Android:0.0.1'
}
1- Init the ThemeManager and load the theme
themeManager = new ThemeManager();
themeManager.loadTapTheme(getResources(),R.raw.theme);
2- Get the theming object from the manager and theme your widgets
mainBinding.setTextViewTheme(themeManager.getAtomsTheme().getTextViewTheme());
Documentation is available at github-pages.