Java tutorial
//package com.java2s; //License from project: Apache License import android.content.Context; import android.content.SharedPreferences; public class Main { public static final String APP_THEME_LIGHT = "isLight"; public static final String APP_LIGHT_KEY = "light_model"; public static boolean isLight(Context context) { SharedPreferences preferences = context.getSharedPreferences(APP_THEME_LIGHT, Context.MODE_PRIVATE); boolean isLight = preferences.getBoolean(APP_LIGHT_KEY, true); return isLight; } }