问题描述
我发现我的 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 (将#修改为@)