Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. <LinearLayout
  2. android:id="@+id/left_big_content"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent"
  5. android:orientation="vertical"
  6. android:background="#FF00FFFF"
  7. >
  8. <TextView
  9. android:layout_width="match_parent"
  10. android:layout_height="wrap_content"
  11. android:text="Quick Menu"
  12. android:textColor="@color/black"
  13. android:textStyle="bold"
  14. android:padding="10dp"
  15. android:textSize="20sp"
  16. android:id="@+id/tv_menu_title"/>
  17.  
  18.  
  19. <!-- The navigation menu -->
  20.  
  21. <ExpandableListView
  22. android:id="@+id/lvExp"
  23. android:layout_width="match_parent"
  24. android:dividerHeight="1dp"
  25.  
  26. android:transcriptMode="alwaysScroll"
  27. android:listSelector="@drawable/category_listselector"
  28. android:divider="@color/black"
  29. android:layout_height="match_parent"
  30. android:layout_gravity="left"
  31. android:background="#E6E6E6" >
  32.  
  33. </ExpandableListView>
  34. </LinearLayout>
  35.  
  36. @Override
  37. public View getGroupView(int groupPosition, boolean isExpanded,
  38. View convertView, ViewGroup parent) {
  39.  
  40.  
  41. LayoutInflater inflater = LayoutInflater.from(_context);
  42.  
  43. convertView =inflater.inflate( R.layout.list_group,parent, false);
  44.  
  45. String headerTitle = (String) getGroup(groupPosition);
  46.  
  47. TextView lblListHeader = (TextView) convertView
  48. .findViewById(R.id.lblListHeader);
  49. lblListHeader.setTypeface(null, Typeface.BOLD);
  50. lblListHeader.setText(headerTitle);
  51.  
  52. return convertView;
  53. }
  54.  
  55. @Override
  56. public View getChildView(int groupPosition, final int childPosition,
  57. boolean isLastChild, View convertView, ViewGroup parent) {
  58.  
  59. final String childText = (String) getChild(groupPosition, childPosition);
  60.  
  61. LayoutInflater inflater = LayoutInflater.from(_context);
  62. convertView =inflater.inflate(R.layout.list_item,parent, false);
  63.  
  64.  
  65. TextView txtListChild = (TextView) convertView
  66. .findViewById(R.id.lblListItem);
  67.  
  68. txtListChild.setText(childText);
  69. LinearLayout childLayout= (LinearLayout) convertView.findViewById(R.id.expand_child_layout);
  70. return convertView;
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement