Back to project page calendar-widget.
The source code is released under:
Apache License
If you think the Android project calendar-widget listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.plusonelabs.calendar; /* w w w.j a v a 2s.com*/ import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; public enum Theme { WHITE(R.style.Theme_Calendar_White), LIGHT(R.style.Theme_Calendar_Light), DARK(R.style.Theme_Calendar_Dark), BLACK(R.style.Theme_Calendar_Black); private final int themeResId; private Theme(int themeResId) { this.themeResId = themeResId; } public static int getCurrentThemeId(Context context, String prefKey, String prefDefault) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); return Theme.valueOf(prefs.getString(prefKey, prefDefault)).themeResId; } }