Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <LinearLayout
- android:id="@+id/left_big_content"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:background="#FF00FFFF"
- >
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="Quick Menu"
- android:textColor="@color/black"
- android:textStyle="bold"
- android:padding="10dp"
- android:textSize="20sp"
- android:id="@+id/tv_menu_title"/>
- <!-- The navigation menu -->
- <ExpandableListView
- android:id="@+id/lvExp"
- android:layout_width="match_parent"
- android:dividerHeight="1dp"
- android:transcriptMode="alwaysScroll"
- android:listSelector="@drawable/category_listselector"
- android:divider="@color/black"
- android:layout_height="match_parent"
- android:layout_gravity="left"
- android:background="#E6E6E6" >
- </ExpandableListView>
- </LinearLayout>
- @Override
- public View getGroupView(int groupPosition, boolean isExpanded,
- View convertView, ViewGroup parent) {
- LayoutInflater inflater = LayoutInflater.from(_context);
- convertView =inflater.inflate( R.layout.list_group,parent, false);
- String headerTitle = (String) getGroup(groupPosition);
- TextView lblListHeader = (TextView) convertView
- .findViewById(R.id.lblListHeader);
- lblListHeader.setTypeface(null, Typeface.BOLD);
- lblListHeader.setText(headerTitle);
- return convertView;
- }
- @Override
- public View getChildView(int groupPosition, final int childPosition,
- boolean isLastChild, View convertView, ViewGroup parent) {
- final String childText = (String) getChild(groupPosition, childPosition);
- LayoutInflater inflater = LayoutInflater.from(_context);
- convertView =inflater.inflate(R.layout.list_item,parent, false);
- TextView txtListChild = (TextView) convertView
- .findViewById(R.id.lblListItem);
- txtListChild.setText(childText);
- LinearLayout childLayout= (LinearLayout) convertView.findViewById(R.id.expand_child_layout);
- return convertView;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement