supportsRtl ==> supports right to lift
是否支持 从右到左的布局(主要是方便从右到左的阅读习惯)
官网注解 :
Declares whether your application is willing to support right-to-left (RTL) layouts.
If set to true
and targetSdkVersion
is set to 17 or higher, various RTL APIs will be activated and used by the system so your app can display RTL layouts. If set to false
or if targetSdkVersion
is set to 16 or lower, the RTL APIs will be ignored or will have no effect and your app will behave the same regardless of the layout direction associated to the user's Locale choice (your layouts will always be left-to-right).
The default value of this attribute is false
.
This attribute was added in API level 17.
开发者选项中的开关如下 :
布局代码如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.ufotosoft.demo.MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="LinearLayout" />
<LinearLayout
android:layout_width="match_parent"
android:lay