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

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -