Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

imagebutton get background color programmatically

int color = 0;
Drawable background = imageButton.getBackground();
if (background instanceof ColorDrawable) {
    color = ((ColorDrawable)background).getColor();
}
 
PREVIOUS NEXT
Tagged: #imagebutton #background #color #programmatically
ADD COMMENT
Topic
Name
6+3 =