-3

Consider we have two Activies: Activity A and Activity B, both have an ImageView. If we click on ImageView in Activity A, ImageView in Activity B should change to another image. Please tell us, how to achieve this by using interface

Your timely suggestions will help us a lot

Yasin Kaçmaz
  • 6,573
  • 5
  • 40
  • 58

2 Answers2

1

Send some info about the clicked image in Activity A to Activity B using Intent. Then based on that info show the corresponding image in Activity B

josh_gom3z
  • 294
  • 1
  • 13
  • If we click on imageview1 in row position 1,it should change to another imageview (for highlightion) only in the same row. If we click on imageview1/imageview2/imageview3 in same row or some other row, it should change to another imageview only in the row we clicked and imageview1 in row position 1 should change to previous image.Like that, it should change for each click of imageview Can someone please help us with this Your timely suggestions will help us alot – Siva Perumal.J Nov 16 '17 at 05:38
  • Hi,consider we have five rows in Recyclerview. Each and every row has three imageviews, imageview1,imageview2 and imageview3. (we have designed imageviews in adapter class) If we click on imageview1 in row position 1,it should change to another imageview (for highlightion) only in the same row. If we click on imageview1/imageview2/imageview3 in same row or some other row, it should change to another imageview only in the row we clicked and imageview1 in row position 1 should change to previous image.Likewise, it should change for each click of imageview Please suggest us with this – Siva Perumal.J Nov 16 '17 at 05:46
  • You have some info about the images to be shown and not shown right?. Pass that info to next Activity. If not, I would suggest storing some info about what images to be shown in each row. Then pass that info to the next Activity. – josh_gom3z Nov 16 '17 at 06:17
0

As i understand what you are asking for has been asked many times. Its how to send data between activities. Here is an answer from another thread. Also you can check the Android documentation and read about bundles.

exe
  • 107
  • 6