Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

get current background color of TextView java

if (textView.getBackground() instanceof ColorDrawable) {
    ColorDrawable cd = (ColorDrawable) textView.getBackground();
    int colorCode = cd.getColor();
}
Comment

PREVIOUS NEXT
Code Example
::  
::  
::  
::  
::  
::  
::  
::  
::  
Java ::  
::  
Java ::  
::  
::  
::  
::  
::  
::  
::  
::  
Javascript ::  
::  
::  
::  
::  
::  
::  
::  
::  
Javascript ::  
ADD CONTENT
Topic
Content
Source link
Name
8+3 =