to replace the image in the layout programmatically, in my case, i need to refer to the image from another layout of the other class. There is: the first class, which is extended by the second class, each class has its own layout. I need to refer from the first class to the image in the mockup of the second class.
How do I do this based on the image replacement code below?
ImageView img= (ImageView) findViewById(R.id.image);
img.setImageResource(R.drawable.my_image);