SimpleThemeEngine

Simple ThemeEngine for Android, change Themes during runtime with ease.

License

License

GroupId

GroupId

com.pddstudio
ArtifactId

ArtifactId

simplethemeengine
Last Version

Last Version

0.0.2
Release Date

Release Date

Type

Type

aar
Description

Description

SimpleThemeEngine
Simple ThemeEngine for Android, change Themes during runtime with ease.
Project URL

Project URL

https://github.com/pddstudio/SimpleThemeEngine
Source Code Management

Source Code Management

https://github.com/pddstudio/SimpleThemeEngine

Download simplethemeengine

How to add to project

<!-- https://jarcasting.com/artifacts/com.pddstudio/simplethemeengine/ -->
<dependency>
    <groupId>com.pddstudio</groupId>
    <artifactId>simplethemeengine</artifactId>
    <version>0.0.2</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.pddstudio/simplethemeengine/
implementation 'com.pddstudio:simplethemeengine:0.0.2'
// https://jarcasting.com/artifacts/com.pddstudio/simplethemeengine/
implementation ("com.pddstudio:simplethemeengine:0.0.2")
'com.pddstudio:simplethemeengine:aar:0.0.2'
<dependency org="com.pddstudio" name="simplethemeengine" rev="0.0.2">
  <artifact name="simplethemeengine" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.pddstudio', module='simplethemeengine', version='0.0.2')
)
libraryDependencies += "com.pddstudio" % "simplethemeengine" % "0.0.2"
[com.pddstudio/simplethemeengine "0.0.2"]

Dependencies

compile (1)

Group / Artifact Type Version
com.android.support » support-annotations jar 23.0.1

Project Modules

There are no modules declared in this project.

SimpleThemeEngine

A lightweight, fast and easy to use Android library for adding multiple themes and color schemes to your Android Application. Change your application's look and feel during runtime with ease.

##Requirements None. SimpleThemeEngine is a standalone library with support for API Level 7 and higher.

##Features

  • Create pre-defined Themes and change between them during runtime
  • Let your users theme your application as they want to.
  • You decide what you want to be themed with the SimpleThemeEngine

##Limitations This library does only serve themes and reacts on changes, in case you have dynamic themes or want to restore the last theme settings on your application's startup you have to do this on your own. For an example how to save and restore your themes have a look at the sample application

##Importing

To use the SimpleThemeEngine you have to add it as dependency to your project.

####Gradle compile 'com.pddstudio:simplethemeengine:0.0.2'

####Maven

<dependency>
    <groupId>com.pddstudio</groupId>
    <artifactId>simplethemeengine</artifactId>
    <version>0.0.2</version>
</dependency>

##Quickstart Note: For more detailed instructions and explanations have a look at the demo application or head over to the wiki ####Initializing the Library Add the ThemeEngine to your application's startup method.

@Override
protected void onCreate(Bundle savedInstanceState) {
	//defaults
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_main);

	//initialize the SimpleThemeEngine
	ThemeEngine.initThemeEngine(this);
}

Note: To prevent unwanted fc's you have to set a fallback color scheme after calling ThemeEngine.initThemeEngine(this);. These colors should be hardcoded into your application's code or included in your ressources.

ThemeEngine.setFallbackColors(fallbackPrimary, fallbackPrimaryDark, fallbackAccent, ApplicationTheme.THEME_LIGHT, ThemeFontColor.LIGHT_FONT_COLOR);

Register your application's IBackendNotificationInterface, there you define what happens on several events. Head over to the demo application for an example, or take a look at the wiki

Finally call

ThemeEngine.loadSettingsThemeObject();

Done. The SimpleThemeEngine is now ready to use.

####Start Theming After initializing the ThemeEngine, you can start customizing your application. Add an OnThemeChangedListener to the class you want to add theming support and register the interface at your ThemeEngine instance via ThemeEngine.registerThemeListener(identifier, OnThemeChangedListener); Take a look at the demo application for an example or head over to the wiki

##Showcase ####Video Watch the demo video of the SimpleThemeEngine implemented in an other project im working on: ThemeEngine Demo Video ####Demo Application Download demo application or Test it in your Browser with Appetize

##Bug Reports & Contributing Feel free to report any bug or feature request you find/have using the GitHub Issue Tracker In case you want to contribute, feel free to create a pull request.

##Contact Feel free to contact me on Google+ / Hangouts or via E-Mail

##License Copyright 2015 Patrick J

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.

Versions

Version
0.0.2
0.0.1