android:更改用于导航的可扩展列表视图的指示器图标和大小
我正在制作一个应用程序,其中我必须使用给定的图像来扩展列表视图。实际上,我正在谈论导航路径的指示器图标及其大小。任何人都可以告诉我如何更改该图像。任何帮助将不胜感激。
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 me how to change that image .Any help will be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
您可以使用以下代码:
... 其中
setting_selector
是:You can use the following code:
... where the
setting_selector
is:他
忘了把
它放进去。
对我来说,
android:state_empty
不起作用。And
He forgot to put
in it.
For me,
android:state_empty
not working.这是设置组指示器的有效方法
this is efficient way to set group indicator
如果您指的是展开/折叠组图标,那么
我不太确定指示器的大小,设置指示器边界可以影响指示器的宽度,但不会影响高度。
您可以通过将可绘制对象设置为 null 来删除指示器,然后在 ExpandableAdapter 的 getGroupView() 中使用图像视图来膨胀自定义布局。
尽管此方法需要一些额外的工作才能使指示器在组展开时发生变化,例如侦听器来判断特定组是否展开并相应地更改图像。
If you mean the expand/collapsed group icon then
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.
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.
这是正确的,检查我的应用程序
使用下面这样的......
It's correct, check my app
Use follow below like this....
尝试使用这个:
Try using this: