extracting color code on button click-android -



extracting color code on button click-android -

is there way extract color code (background color) of button on clicking , using in curresponding java code?

the purpose same identifier on clicking same colored buttons in different activities.

you can utilize getcurrenttextcolor()

button.setonclicklistener(new view.onclicklistener() { public void onclick(view v) { int color = button.getcurrenttextcolor(); } });

android button

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -