I have created a ListView
that is populated with JSON
data, and I have included OnItemClickListener
to open a new Activity
through Intent
. What I'm trying to do is to make that new Activity
generate data based on the item I have clicked in the ListView
.
For example, if I clicked item from JSON
field name JohnDoe
in the ListView
, I want to generate page with information from another JSON
data file. And concrete example would be like the Google Play Store.
I click some app and it opens a page with populated info about that app.
Edit: I have tried that passing object link, and it doesnt work. I have getter and setter in a class, then I parse it in my main class.
Example here:
JSONObject obj = response.getJSONObject(i);
Movie movie = new Movie();
movie.setTitle(obj.getString("title"));
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…