ImageView mIv =
(ImageView) findViewById(R.id.xidIma);
// create context Object for to Fetch
image from resourse
Context mContext=getApplicationContext();
//
getResources().getIdentifier("image_name","res_folder_name",
package_name);
// find out below example
inti=mContext.getResources().getIdentifier("ic_launcher","raw",mContext.getPackageName());
// now we will get contsant id for
that image
mIv.setBackgroundResource(i);
I
will be happy if you will provide your feedback or follow this blog. Any suggestion
and help will be appreciated.
Thank
you :)