android中为不同的组设置不同的指标
我想知道如何在 ExpandableListView 中为不同的组设置不同的指示器。
我尝试过:
if(true condition for a group say groupA)
{
getExpandableListView().setGroupIndicator(getResources().getDrawable(R.drawable.image));
}
但是上面的代码为视图中的所有组设置了指示器! 我希望所有组都有不同的指标,例如:
groupA 有不同的指标;groupB 有不同的指标;groupC 有不同的指标
,其中 groupA、groupB 和 groupC 有一定数量的孩子。
任何人都可以提出建议吗?
-阿迪亚。
I would like to know how to set different indicators for different groups in ExpandableListView.
I tried :
if(true condition for a group say groupA)
{
getExpandableListView().setGroupIndicator(getResources().getDrawable(R.drawable.image));
}
but the above code sets the indicator for all the groups in the view !
I want different indicators for all the groups like :
groupA having a different indicator;groupB having a different indicator;groupC having a different indicator
where groupA,groupB and groupC have certain number of children.
Can anyone suggest something ?
-Adithya.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在可扩展列表视图中创建不同的指示器。
首先为可扩展的listView创建适配器。
为所有不同的指标创建自定义布局。
现在在你的 getGroupView 方法中
试试这个这对我有用......
希望这对你有帮助..
To create different indicator in expandable listview.
First of all create Adapter for expandable listView.
Create custom layout for all different indicator.
Now in your getGroupView method
Try this this is work for me...
Hope this is helpful for you..