Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. @Override
  2. public View getChildView(int groupPosition, int childPosition,
  3. boolean isLastChild, View convertView, ViewGroup parent) {
  4.  
  5. View v = convertView;
  6.  
  7. if (v == null) {
  8. LayoutInflater inflater = (LayoutInflater)ctx.getSystemService
  9. (Context.LAYOUT_INFLATER_SERVICE);
  10. v = inflater.inflate(R.layout.listview_row_child, parent, false);
  11. }
  12.  
  13. TextView itemName = (TextView) v.findViewById(R.id.itemName);
  14. Swith itemDescr = (Switch) v.findViewById(R.id.itemDescr);
  15.  
  16. ChildModel det = catList.get(groupPosition).getItemList().get(childPosition);
  17.  
  18. itemName.setText(det.getName());
  19. // itemDescr.setText(det.getChoices()[0] + det.getChoices()[1]);
  20. itemDescr.setTextOff(det.getChoices()[0]);
  21. itemDescr.setTextOn(det.getChoices()[1]);
  22.  
  23. return v;
  24.  
  25. }
  26.  
  27. inflater.inflate(R.layout.child_item, null);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement