Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. @Override
  2. public void onCreate(Bundle savedInstanceState)
  3. {
  4. super.onCreate(savedInstanceState); //gemmer sidste tilstand
  5.  
  6. // Create Expandable List and set it's properties
  7. ExpandableListView expandableList = getExpandableListView();
  8. expandableList.setDividerHeight(2);
  9. expandableList.setGroupIndicator(null);
  10. expandableList.setClickable(true);
  11.  
  12. // Set the Items of Parent and child
  13. prepareListData();
  14.  
  15. // Create the Adapter
  16. adapter = new MyExpandableAdapter(parentParam, childItems);
  17. //setListAdapter(adapter);
  18.  
  19. //ExpandableListView listView = (ExpandableListView) findViewById(R.id.listView);
  20. adapter.setInflater((LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE), this);
  21. adapter.notifyDataSetChanged();
  22.  
  23. // Set the Adapter to expandableList
  24. expandableList.setAdapter(adapter);
  25. expandableList.setOnChildClickListener(this);
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement