0

I have to parse json data form server with volley. Data can be Image and Text. Then I have to show this data in Recycle view. I done this without any problem. But when user click the specific position the cached data will be show in another activity with details. I can do this by duplicate code with passing arraylist and again parse data with volley but I do not want to do that. I already Parsed data so how can I pass this Specific data to another Activity?

enter image description here

Yeahia2508
  • 7,526
  • 14
  • 42
  • 71

1 Answers1

1

You can get the selected data in onClick listener of RecyclerView and pass it to another activity by using intent (with multiple put extras) or Static Object of your list item.

SANAT
  • 8,489
  • 55
  • 66
  • I can send string with put extras but What i have to do if I want to send Image? I parsed json Image url and then I loaded the Image in RecycleView apater class with volley. How can I Send this Image along with it's same postion String? See my ScreenShot. – Yeahia2508 Aug 19 '15 at 10:51
  • @yeahia2508 You can pass URL of image to next activity or pass the bitmap of image in intent – SANAT Aug 19 '15 at 10:53
  • You can pass bitmap in intent like this check my accepted answer : http://stackoverflow.com/questions/31672342/intent-seems-not-sent-between-activity/31672573#31672573 – SANAT Aug 19 '15 at 11:02
  • @yeahia2508 Accept as correct answer if it helps you. – SANAT Aug 19 '15 at 11:11
  • Brother In header I said that I am parsing data with volley. I am not used bitmap. – Yeahia2508 Aug 19 '15 at 11:20
  • I think you can get the bitmap from imageview of recyclerview item – SANAT Aug 19 '15 at 11:31