ExpandableListView自带的小箭头样式不太好看,其实我们可以自己更换的。步骤如下:
1.隐藏ExpandableListView自带的图标。
exListView = (ExpandableListView) findViewById(R.id.ex_KnowledgeList);
exListView.setGroupIndicator(null); // 隐藏ExpandableListView自带的图标
// 判断组视图是否展开
if (isExpanded) {
groupHeadHold.iv_arrow.setBackgroundResource(R.drawable.arrow_drop_down_24dp);
groupHeadHold.ll_title_name.setVisibility(View.VISIBLE);
} else {
groupHeadHold.iv_arrow.setBackgroundResource(R.drawable.arrow_drop_right_24dp);
groupHeadHold.ll_title_name.setVisibility(View.GONE);
}