android - How to retrieve the drawable name using id? -
i have imageview changes depending on imagebutton clicked trying name of imagebutton pressed , since know id of imageview, wondering how retrieve name of drawable. searched on internet , found ways of getting id using drawable name or getting entire file path of drawable, there way name of drawable , without extension also, thanks
since imagebutton imageview use tagging:
imagebutton button = (imagebutton) findviewbyid(r.id.buttonid)// button button.settag("youdrawablename"); // drawable name
and read need it:
string drawablename = (string) button.gettag();
Comments
Post a Comment