Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. JSONArray moviesArray = jsonObject.getJSONArray("Movies");
  2. for (int j = 0; j < moviesArray.length(); j++)
  3. {
  4. JSONObject moviesObject = moviesArray.getJSONObject(j);
  5. JSONArray marvelArray = moviesObject.getJSONArray("Marvel");
  6. JSONArray dccArray = moviesObject.getJSONArray("DC COMICS");
  7. .......
  8. for (int k = 0; k < (DOUBT HERE).length(); k++)
  9. {
  10. JSONObject moviesJsonObj = (DOUBT HERE).getJSONObject(k);
  11. String movieName = moviesJsonObj.getString("Release Year");
  12. String releaseYear = moviesJsonObj.getString("DeityName");
  13. Movies movies = new Movies(movieName, releaseYear)
  14. moviesList.add(movies);
  15. moviesAdapter= new moviesAdapter(moviesList);
  16. recyclerView_Marvel.setAdapter(moviesAdapter);
  17. recyclerView_DCComics.setAdapter(moviesAdapter);
  18.  
  19. i have stored Marvel movies in marvel array and dc movies in dc array. now i need to pass both of these arrays into another class to extract the movie name and release year and then put them in a recycler view.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement