Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. private List<HashMap<String, String>> fillMaps;
  2. private SimpleAdapter adapter;
  3.  
  4. list = (ListView) findViewById(android.R.id.list);
  5.  
  6. // My data
  7. fillMaps = new ArrayList<HashMap<String, String>>();
  8.  
  9. adapter = new SimpleAdapter(this, fillMaps, R.layout.questions_list,
  10. new String[] {"train", "to"},
  11. new int[] {R.id.TRAIN_CELL, R.id.TO_CELL});
  12.  
  13. for ( int i = 0; i < obj.length(); i++ )
  14. {
  15. HashMap<String, String> map = new HashMap<String, String>();
  16.  
  17. question_id = o.getString("question_id");
  18. question = o.getString("question");
  19. question_by_member_id = o.getString("member_id");
  20.  
  21. map.put("train", question);
  22. map.put("from", ">");
  23.  
  24. fillMaps.add(map);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement