I am working on application in which user will be able to retrieve data from weburl using json and i have made that module, but now i want to show selected listview item in another activity using intent in which i have to show them Image and Text of selected Item...could you please show me some source code or way to write the code for the same one.
Asked
Active
Viewed 882 times
2 Answers
1
If you're inflating a view from JSON data, couldn't you just send the JSON string as an extra with the activity intent, and the inflate the view inside the second activity? For example,
Intent.putExtra("json",mJson);
where mJson is the name of your string object containing the JSON. Then in your other activity's onResume, do something like
mJson = getIntent().getExtras().getString("json");
And then inflate the view using that JSON string.

berwyn
- 986
- 7
- 23
1
You can not simply add image into your bundle.you can add your text simply like Intent.putExtra("text",yourText);
To add image into bundle refer this,
how do you pass images (bitmaps) between android activities using bundles?
You have to use parceble object within bundle.

Community
- 1
- 1

Ramindu Weeraman
- 344
- 2
- 10