ExpandableListView箭头右边显示最简单方法

一:这是最快最简单的方法

1.首先要在AndroidManifest.xml文件中将<application>标签的android:supportsRtl属性值设为"true"(开启支持从右向左布局)

2.然后需要ExpandableListView标签设置android:layoutDirection="rtl";意思是布局从右向左(阿拉伯国家都是这样样式)

<ExpandableListView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layoutDirection="rtl"/>

3.一级布局中设置android:layoutDirection="ltr";布局中的文字要从左向右

二:还有其它方法,需要隐藏自带图标,自己自定义布局,可以去百度搜索

发布了12 篇原创文章 · 获赞 4 · 访问量 9601

猜你喜欢

转载自blog.csdn.net/lhy24680/article/details/100030663