I am making an app in which i have to use given images for expandable list view .Actully i am talking of indicator icon and its size which navigate the path.Can anyone tell
If you mean the expand/collapsed group icon then
Drawable d = getResources().getDrawable(R.drawable.settings_selector);
//position it in the group layout by setting the bounds
//params are left and right bounds
myExpandableList.setIndicatorBounds(345,375);
myExpandableList.setGroupIndicator(d);
I'm not too sure about the size of the indicator, setting the indicator bounds can affect the width of the indicator but not the height.
You could remove the indicator by setting the drawable to null, then inflate a custom layout with an image view in it in getGroupView() in the ExpandableAdapter.
public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
View convertView = null;
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.customLayout, null);
return convertView;
}
Although this method would require some extra work to get the indicator to change when the group is expanded, such as a listener to tell whether or not a particular group is expanded and change the image accordingly.