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

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

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

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