我正在使用 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 - android :supportsRtl in Androidmanifest 警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27875704/