Android Studio从右到左ListView

The*_*eal 3 android android-layout

我一直在尝试使ListView作为RTL(从右到左)工作.我在ListView和LinearLayout属性中添加了以下行:

android:layoutDirection="rtl"

它仍然从左到右显示列表.

有任何想法吗?

在此输入图像描述

The*_*eal 5

谢谢大家,但我解决了它:

android:textDirection="rtl"
Run Code Online (Sandbox Code Playgroud)

我已经将它添加到ListView和布局中,并且它有效.下次你应该尝试考虑将它用于RTL布局.