Reputation: 743
<ExpandableListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:groupIndicator="@drawable/group_indicator"
android:background="#ffffff"
/>
I have used an expandable list view with group Indicator... if in list view fourth position, there is no child for a group ...then it should not show the indicator in fourth position ...how to go with it
Upvotes: 2
Views: 2166
Reputation: 2928
Try to set android:groupIndicator attribute of ExpandableListView a null value or transparent color.
Something like android:groupIndicator="@android:color/transparent"
Upvotes: 2
Reputation: 24031
try like this:
public View getGroupView(int groupPosition, boolean isExpanded, View convertView,
ViewGroup parent) {
convertView = newGroupView(isExpanded, parent);
ImageView inidicatorImage = (ImageView) convertView.findViewById(R.id.explist_indicator);
if( groupPosition == 4 ) {
inidicatorImage .setVisibility( View.INVISIBLE );
} else {
inidicatorImage .setVisibility( View.VISIBLE );
}
return convertView;
}
Upvotes: 1
Reputation: 24031
In yourAdapter -> getGroupView() set the visibility of the indicator image to invisible...
I did this thru custom adapter and setting my own indicator image....
Upvotes: 0