Is it possible to obtain styled attributes values from particular Theme without setting the theme up to application/activity?
(I mean before invoking context.setTheme(
For example, to get editTextColor attribute's value of a theme called MyTheme:
TypedArray a = getTheme().obtainStyledAttributes(
R.style.MyTheme,
new int[] { R.attr.editTextColor });
// Get color hex code (eg, #fff)
int intColor = a.getColor(0 /* index */, 0 /* defaultVal */);
String hexColor = Integer.toHexString(intColor);
// Don't forget to recycle
a.recycle();