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 -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

Set Up Of Common Name Of SSL Certificate To Protect Plesk Panel -