android - 我怎么能使用"android:layoutDirection"?

Kha*_*yed 10 android android-layout

似乎android 4 为linearLayout 提供了"android: layoutDirection ",为textView提供了"android:textDirection",但是当我选择它们时,我得到一个编译错误,它不能像那样识别它们:

error: No resource identifier found for attribute 'layoutDirection' in package 'android'

我也无法在互联网上找到有关这些属性的更多信息.它们意味着什么,为什么我不能使用它们?

小智 9

如果将项目属性更改为API级别17,则可以使用它.


boi*_*ter 9

可能会帮到你.

Note: To enable right-to-left layout features for your app, you must set supportsRtl to "true" and set targetSdkVersion to 17 or higher.
Run Code Online (Sandbox Code Playgroud)

http://developer.android.com/guide/topics/resources/providing-resources.html#table2