I have image..I want to convert it to bitmap & show it as bitmap.It is a default image. Now my architecture just like following way. I want to convert it to bitmap & return...
final int stub_id=R.drawable.tnlrocks;
photoToLoad.imageView.setImageResource(stub_id);
I did this. but it doesn't work. Help to overcome this problem......
Bitmap largeIcon = BitmapFactory.decodeResource(context.getResources(), R.drawable.tnlrocks);
photoToLoad.imageView.setImageBitmap(largeIcon );
please help me to overcome this problem......
尝试这个:
photoToLoad.imageView.setImageDrawable(stub_id);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.