android - android :supportsRtl in Androidmanifest 警告

标签 android android-manifest right-to-left

我正在使用 android:minSdkVersion="12"和 android:targetSdkVersion="21"开发 android 应用程序。在我的 list 文件中,我看到了一条警告:“项目引用了 RTL 属性,但没有使用 android:supportsRtl 在 list ”。它的实际含义是什么。我刚刚浏览了链接 http://developer.android.com/guide/topics/manifest/application-element.html.But 对这个问题不太了解。下面是我在 xml 中用于一个 View 的代码。

<EditText
        android:id="@+id/terminal_id_edit_text"
        android:layout_width="fill_parent"
        android:layout_height="@dimen/edit_text_height"
        android:layout_marginEnd="@dimen/edit_text_right_margin"
        android:layout_marginLeft="@dimen/edit_text_left_margin"
        android:layout_marginRight="@dimen/edit_text_right_margin"
        android:layout_marginStart="@dimen/edit_text_left_margin"
        android:background="@drawable/editetxt_bg"
        android:inputType="text"
        android:hint="@string/terminal_id_text" 
        android:maxLength="8"
        android:nextFocusDown="@+id/client_id_edit_text"
        android:paddingLeft="@dimen/edit_text_padding"
        android:paddingRight="@dimen/edit_text_padding"
        android:singleLine="true"
        android:textColor="@color/color_white"
        android:textCursorDrawable="@null"
        android:textSize="@dimen/normal_text_size" />`

最佳答案

android:supportsRtl 声明您的应用程序是否愿意支持从右到左 (RTL) 布局。 如果设置为 true 并且 targetSdkVersion 设置为 17 或更高,系统将激活和使用各种 RTL API,以便您的应用程序可以显示 RTL 布局。如果设置为 false 或 targetSdkVersion 设置为 16 或更低,RTL API 将被忽略或无效,并且无论与用户的 Locale 选择相关联的布局方向如何,您的应用程序都将表现相同(您的布局将始终保留- 向右)。 此属性的默认值为 false。 此属性是在 API 级别 17 中添加的。

更多:android:supportsRtl

关于android - android :supportsRtl in Androidmanifest 警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27875704/

相关文章:

java - 我可以更改应用程序名称吗(android :label at manifest) or icon (android:icon at manifest) dynamically?

Android:Play Store 忽略了 uses-sdk minSdkVersion?

java - 当 ComponentOrientation 设置为 RTL 时 JLabel 和 JTextField 之间的不一致

安卓应用 : Web vs Native

android - 将信息从不同的文件导入到 AndroidManifest

javascript - 通过在 Vuejs 中选择语言来改变方向

ckeditor - 如何在CKEditor中动态切换文本方向

android:如何停止和启动线程(带有错误代码示例)

php - 在 Android 中显示来自 MySQL 数据库的数据,类似于 Twitter Feed

android - SIP注册