【发布时间】:2018-02-28 00:11:09
【问题描述】:
当我更改设备语言时,不在 strings.xml 中的字符串会显示在我的文本视图中。
下面是我的文本视图代码:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="@dimen/padding_all_activity_16"
android:text="@string/check_document_image_readable"
android:textSize="18sp"
android:textStyle="bold" />
......
在 values/string.xml 文件中:
<string name="check_document_image_readable">A foto ficou legível?</string>
我的应用不支持其他语言(它是用葡萄牙语编写的)。
我正在使用 Android Studio 3.0.1 进行开发。这发生在 API 的 24 和 25 中。
我怎样才能只将 values/strings.xml 用于任何设备语言?
【问题讨论】:
标签: android android-studio textview