复选框中的文本未使用本地化字符串更新

问题描述

我发现我的 android 应用程序有一个奇怪的错误我有一个与对话框关联的复选框(即,它作为对话框的一部分显示在 UI 中)。

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="vertical"
              >
    <FrameLayout
        android:layout_width="@dimen/dialog_width"
        android:layout_height="wrap_content">

        <CheckBox
            android:id="@+id/checkBox1"            
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="?android:attr/textColorPrimary"
            android:button="@null"
            android:text="@string/textcontent"
            android:textSize="@dimen/checkBox_text_size"
            android:layout_gravity="end|center_vertical"
            android:gravity="end"/>
    </FrameLayout>
</LinearLayout>

当语言设置为日语 ie' 当语言环境设置为 JP 时 - 与字符串对应的 jp 资源不会显示在 UI 中。

注意:尝试使用 UIAutomatorViewer 调试此问题 - 我可以看到在布局中替换了字符串 textcontent 的日语值 - 但在屏幕上看到的值为 english。我不确定为什么会观察到这种差异。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...