找到了一种最简答的解决方案。如下
This is what you need to do:
1) set layout direction to right-to-left
<ExpandableListView
...
android:layoutDirection="rtl" />
2) make sure your list item layout includes this (yes, you'll need custom layout):
android:gravity="left" //to adjust the text to align to the left again
android:layoutDirection="ltr" //OR this line, based on your layout
And you are good to go!
本文介绍了一种在右对左(RTL)布局方向中实现文本左对齐的简单解决方案。具体步骤包括:设置ExpandableListView的布局方向为RTL,并确保列表项布局包含特定属性来调整文本对齐方式。
1222

被折叠的 条评论
为什么被折叠?



