Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ListView menu = findViewById(R.id.listView);
- ArrayList <HashMap<String,String>> data = new ArrayList<>();
- HashMap <String, String> text = new HashMap<>();
- text.put("Header", "Theory");
- text.put("Text", "You need to learn it");
- data.add(text);
- menu.setAdapter(new SimpleAdapter(this,
- data,
- android.R.layout.simple_list_item_2,
- new String[]{"Header", "Text"},
- new int[]{android.R.id.text1, android.R.id.text2}));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement