I know there are many built-in themes for ActionBar: Holo Light, Holo Dark, Holo Light with Dark ActionBar...
Is there any way to know, is the current theme of ActionBar is Dark or Light?
I know there are many built-in themes for ActionBar: Holo Light, Holo Dark, Holo Light with Dark ActionBar...
Is there any way to know, is the current theme of ActionBar is Dark or Light?
With suggest from Android developer community (Google+), I finally find there such method from HoloEverywhere source code: ThemeManager.getThemeType(context)
public static int getThemeType(Context context) { TypedArray a = context.obtainStyledAttributes(new int[] { R.attr.holoTheme }); final int holoTheme = a.getInt(0, 0); a.recycle(); switch (holoTheme) { case 1: return DARK; case 2: return LIGHT; case 3: return MIXED; case 4: return PreferenceManagerHelper.obtainThemeTag(); case 0: default: return INVALID; } }