I would like to set the theme-appropriate ProgressBackgroundColorSchemeColor
and colorSchemeColors
of my Swipe Refresh Layout in XML.
However, I can only seem to find solutions to do it programmatically like this one below.
TypedValue typedValue = new TypedValue();
int colorValue;
if (context.getTheme().resolveAttribute(R.attr.xxx, typedValue, true))
colorValue = typedValue.data;
else
colorValue = Color.TRANSPARENT;
mSwipeRefreshLayout.setColorSchemeColors(colorValue);
These attributes are also not recognized in XML; so is it at all possible?