I use the following code to get a bitmap from the resources folder put it into a drawable and paint it to the canvas
Drawable f = getResources().getDrawable(R.drawable.harris1);
f.setBounds(a,120,a+200,270);
f.draw(canvas);
I want to be able to get the bitmap from my pictures directory on my device and paint it on the canvas
I get the filepath as follows
File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
String name = "harris1.jpg";
File file = new File(path, name );
String fileName = String.format("%s/" + name, path);
in this instance filename is equal to "/storage/emulated/0/Pictures/harris1.jpg"
How do i change the line
Drawable f = getResources().getDrawable(R.drawable.harris);
to use the filname of the picture on the device?
Any Help Appreciated
Mark