java - Android ImageView set to local URL not working? -
so new android, not understand why not work (and how work):
imageview = (imageview) findviewbyid(r.id.image_to_display); uri uri = (uri) extras.getparcelable(intent.extra_stream); i.setimageuri(uri)
i did toast , have made sure uri.tostring() returns url content://...
sure i
valid reference, because able set local images part of .apk
.
so why not work, , how can work?
thanks
if don't have have uri instead.
string fullpath = environment.getexternalstoragedirectory() + "/pathtoyourfile" // take path create bitmap , populate imageview it. imageview iv = (imageview) v.findviewbyid(r.id.thumbnail); bitmap bm = bitmapfactory.decodefile(fullpath); iv.setimagebitmap(bm);
Comments
Post a Comment