android - Iterate over a java map and change values -


i have map of <checkbox, imagebutton>.

i want able iterate on map , change image of each imagebutton. there way can this? getvalue() doesn't seem let me use methods associated each imagebutton.

taken this answer

you have cast result of getvalue imagebutton use functions.

iterator = mp.entryset().iterator(); while (it.hasnext()) {     map.entry pair = (map.entry)it.next();     ((imagebutton)pair.getvalue()).setimagebitmap(bitmap); } 

Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

qt - Passing a QObject to an Script function with QJSEngine? -

c# - Web API response xml language -