Search
 
SCRIPT & CODE EXAMPLE
 

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;
Comment

PREVIOUS NEXT
Code Example
Java :: java add com.google.guava dependancy maven 
Java :: android splash screen 
Java :: convert int to string java 
Java :: java string padding 
Java :: String by byte array in java 
Java :: java array remove space 
Java :: java random unique number 
Java :: java export image 
Java :: generate random color in java in android 
Java :: java jframe example 
Java :: android date 
Java :: enum type spring boot entity 
Java :: java string format thousand separator 
Java :: qr code generator in java 
Java :: n queens problem leetcode 
Java :: can we create a class inside a class in java 
Java :: java how to cast int to String 
Java :: java divisible by operator 
Java :: view get text android 
Java :: map interation in java 
Java :: if number is negative java 
Java :: java text file to arraylist 
Java :: java read directory 
Java :: java zip file 
Java :: input array in String in java 
Java :: how to initialize bigdecimal in java 
Java :: Java Create LinkedList in Java 
Java :: load file as string java 
Java :: java comments 
Java :: milliseconds to seconds java 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =