imageview - Change Icon programatically from custom location android -
how can change icon in android app. located @ custom location. example: created new package in drawable i.e drawable/pre_paid_ico , can't access icon location in programmatically way. here code
iconview = (imageview) findviewbyid(r.id.icon); int imageid = getresources().getidentifier(array_ico[0], //icon name array e.g[bg_icon] "drawable/pre_paid_ico",//location of icons "package.name.here"); //package name iconview.setimageresource(imageid);
Comments
Post a Comment