Android set background from filepath -


i similar imageview.setimageresource(r.drawable.myimage); instead of providing image app's resources, point file (/sdcard/.../image.jpg).

is there way that not involve loading bitmap , setting bitmap imageview ?

thanks

you can update background sdcard follows...

string pathname = environment.getexternalstoragedirectory().getpath() + "/folder/" + "image.jpg"; bitmap bitmap = bitmapfactory.decodefile(pathname); imageview.setimagebitmap(bitmap); 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -