-
Notifications
You must be signed in to change notification settings - Fork 3
Getting Started
os-thm (stands for: opensource-theme) is software that can manage, edit, import, export or remove themes. One of the os-thm's key features is that the theme can be applied globally, which means that the theme can used by apps that have already implemented os-thm. os-thm is intended to be open-source, rich, and easy to use.
This wiki tells you how developers like you can implement os-thm themes in your Android app. So, let's get started!
We're assuming you've already implemented os-thm via Gradle or by importing the AAR.
If you haven't, go download the AAR or implement it via Gradle.
Start by going to an activity. For this example, let's choose MainActivity.
Let's start by declaring a new instance of OsThmTheme, named currentTheme. Add this to your imports:
import tw.osthm.OsThmTheme;
import tw.osthm.osthmManager;
Now, let's declare and initialize currentTheme.
Go into your onCreate/onStart method and enter this code:
OsThmTheme currentTheme = osthmEngine.getCurrentTheme();
You can also declare it as private or final variable type, depends on your usage.
Your code should look like this if you're declaring it as private variable and you're declaring it in onCreate method.
< Previous Page | Next Page >