Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android use attribute color programmatically

TypedValue typedValue = new TypedValue();
Theme theme = context.getTheme();
theme.resolveAttribute(R.attr.theme_color, typedValue, true);
@ColorInt int color = typedValue.data;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #android #attribute #color #programmatically
ADD COMMENT
Topic
Name
5+1 =