Giter Club home page Giter Club logo

simplethemeengine's Introduction

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.

simplethemeengine's People

Contributors

pddstudio avatar

Stargazers

Netsnake avatar  avatar 宠你 avatar Jordan avatar Liang HAN avatar Eeshdaya Umarikar avatar Pranav Lathigara avatar  avatar Shico avatar

Watchers

James Cloos avatar  avatar  avatar Netsnake avatar

simplethemeengine's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.