Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove default group header icon of Expandable listview

Tags:

I am not able to remove Group header icon of Expandable listview,can anybody tell me how to set it to null in xml..

Update

<ExpandableListView android:id="@+id/elist"     android:layout_marginTop="1dip" android:layout_weight="1"     android:layout_width="fill_parent" android:layout_height="wrap_content"     android:fastScrollEnabled="true" android:scrollbarSize="4dip"     android:smoothScrollbar="true" android:scrollbars="horizontal"     android:groupIndicator="@null" /> 

and my Group header i am Using following xml

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:orientation="horizontal" android:layout_width="fill_parent"     android:layout_height="wrap_content">     <ImageView android:id="@+id/ImageView01"         android:layout_height="wrap_content" android:src="@drawable/zimbabwe"         android:layout_width="wrap_content"         android:layout_marginLeft="10dip">     </ImageView>     <TextView android:id="@+id/childname"         android:paddingLeft="35dip" android:textSize="16dip"         android:layout_width="fill_parent" android:layout_height="wrap_content" /> </LinearLayout> 

but its not working for me

My SimpleExpandableListAdapter is:

SimpleExpandableListAdapter expListAdapter = new SimpleExpandableListAdapter( this,          createBetGroupList("spot"),          R.layout.group_row, new String[] { "BetGroup" },          new int[] { R.id.childname }, createBetChildList("spot") ,          R.layout.child_row, new String[] { "betText","betRate","betID" },          new int[] { R.id.txtBetText, R.id.txtdecRate,R.id.txtstrBetID} ); 
like image 829
nileshbirhade Avatar asked May 12 '11 07:05

nileshbirhade


People also ask

What is Expandable ListView?

Android ExpandableListView is a view that shows items in a vertically scrolling two-level list. It differs from a ListView by allowing two levels which are groups that can be easily expanded and collapsed by touching to view and their respective children items.


1 Answers

You should set in your layout xml file the groupIndicator to null:

<ExpandableListView [...]      android:groupIndicator="@null" /> 
like image 66
rekaszeru Avatar answered Sep 24 '22 00:09

rekaszeru