扩展列表视图中移动组图标指示向右 [英] Expandable list view move group icon indicator to right

查看:195
本文介绍了扩展列表视图中移动组图标指示向右的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

至于以扩展列表视图,组图标指示位于左侧,我可以将指针移动并定位到正确的?谢谢你。

编辑:由于我不希望延长的观点,我得到了这个解决办法动态获取的宽度。只是分享我的解决方案。

显示newDisplay = getWindowManager()getDefaultDisplay()。
INT宽度= newDisplay.getWidth();
newListView.setIndicatorBounds(宽度-50,宽);

解决方案

ExpandableListView 的源$ C ​​$ C,只有这样,才能指示器移到右侧则是使用 ExpandableListView.setIndicatorBounds()方法来改变它的边界。你可以计算必将在 onSizeChanged()的方法,例如。

As regards to expandable list view, the group icon indicator is positioned to the left side, can I move the indicator and positioned it to the right? Thanks.

EDITED: Since I don't want to extend the view, I got this workaround of getting the width dynamically. Just sharing my solution.

Display newDisplay = getWindowManager().getDefaultDisplay(); 
int width = newDisplay.getWidth();
newListView.setIndicatorBounds(width-50, width);

解决方案

According to ExpandableListView's source code, the only way to move an indicator to the right side is to change its bounds using ExpandableListView.setIndicatorBounds() method. You can calculate bound in onSizeChanged() method, for example.

这篇关于扩展列表视图中移动组图标指示向右的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆