android:supportsRtl="true" 有什么用?在 AndroidManifest xml 文件中 [英] What is use of android:supportsRtl="true" in AndroidManifest xml file

查看:30
本文介绍了android:supportsRtl="true" 有什么用?在 AndroidManifest xml 文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我在 android studio 中创建新项目时,我的应用程序 AndroidManifest 文件中都会得到 android:supportsRtl="true".

Whenever I created new project in android studio, I got android:supportsRtl="true" in my app AndroidManifest File.

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
...
</application>

应用中有什么用,或者有什么优势和优势在我的应用程序中添加或不添加 AndroidManifest 时的劣势.

What is use in app, or what is advantages & disadvantage when I add or not add in my app AndroidManifest .

推荐答案

声明您的应用程序是否愿意支持从右到左(RTL) 布局.如果设置为 true 并且 targetSdkVersion 设置为 17 或更高,系统将激活和使用各种 RTL API,因此您的应用程序可以显示 RTL 布局.如果设置为 false 或如果targetSdkVersion 设置为 16 或更低,RTL API 将被忽略或者不会有任何影响,并且您的应用程序的行为将相同,无论与用户的区域设置选择相关联的布局方向(您的布局总是从左到右).

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).

该属性的默认值为 false.

The default value of this attribute is false.

此属性是在 API 级别 17 中添加的.

This attribute was added in API level 17.

(来源:http://developer.android.com/guide/topics/manifest/application-element.html)

这篇关于android:supportsRtl="true" 有什么用?在 AndroidManifest xml 文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆