Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<Map<String, String>> data = new ArrayList<Map<String, String>>();
- for (SyndEntry entry : entries) {
- Map<String, String> datum = new HashMap<String, String>(2);
- datum.put("title", entry.getTitle());
- datum.put("date", entry.getUri());
- data.add(datum);
- }
- SimpleAdapter adapter = new SimpleAdapter(getApplicationContext(), data,
- android.R.layout.simple_list_item_2,
- new String[] {"title", "date"},
- new int[] {android.R.id.text1,
- android.R.id.text2});
- ListView newsFeedListView = (ListView) findViewById(R.id.newsFeedListView);
- newsFeedListView.setAdapter(adapter);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement