I was successful to load image to linear layout and image from local path as below code
ImageView imagePerson=(ImageView) findViewById(R.id.imgPerson);
LinearLayout layoutID=(LinearLayout)findViewById(R.id.layoutID);
imagePerson.setImageResource(R.drawable.image1);
layoutID.setBackgroundResource(R.drawable.layout1);
However, I need to save the path of these image in to file. Thus, I cannot use above code to load image to imageview and linearlayout. Instead of this, I want to find the way to load image from path. Could you help me to solve it in android. This is my code to get path
String pathPerson="drawable://" + R.drawable.imgPerson;
String pathID="drawable://" + R.drawable.layoutID;
Thanks in advance