use of com.simplecity.amp_library.ui.views.Themable in project Shuttle by timusus.
the class ThemeUtils method updateThemableViews.
/**
* Traverses the hierarchy of this view (if it's a ViewGroup). If the view itself or any of its children
* implement {@link Themable}, calls {@link Themable#updateTheme()}
*/
public static void updateThemableViews(View view) {
if (view instanceof ViewGroup) {
for (int i = 0, count = ((ViewGroup) view).getChildCount(); i < count; i++) {
View child = ((ViewGroup) view).getChildAt(i);
updateThemableViews(child);
}
} else {
if (view instanceof Themable) {
((Themable) view).updateTheme();
}
}
}
Aggregations