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

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -