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

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

问题描述

每当我在android studio中创建新项目时,我的应用程序AndroidManifest File中就会出现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天全站免登陆