Android文本更改导致屏幕的其余部分无法加载
我正在尝试使用以下方法更改操作时的文本:Android文本更改导致屏幕的其余部分无法加载,android,Android,我正在尝试使用以下方法更改操作时的文本: final TextView textViewToChange = (TextView) findViewById(R.id.registerTextHeader); textViewToChange.setText("Error getting seed! (" + message + ") TEXT HERE NOT SHOWING"); 消息是一个字符串。但是,一旦触发此更改,我会得到: “获取种子时出错!(错误1” 当我期望得到: “获取种子
final TextView textViewToChange = (TextView) findViewById(R.id.registerTextHeader);
textViewToChange.setText("Error getting seed! (" + message + ") TEXT HERE NOT SHOWING");
消息是一个字符串。但是,一旦触发此更改,我会得到:
“获取种子时出错!(错误1”
当我期望得到:
“获取种子时出错!(错误1)此处未显示文本”
布局XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/registerTextHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/registration_header" />
<EditText
android:id="@+id/userID"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<requestFocus />
</EditText>
<EditText
android:id="@+id/userPassword"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<Button
android:id="@+id/registerSubmitButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Button" />
</LinearLayout>
找到了问题…字符串消息长度为1024字节,包含导致问题的填充。消息变量的类型是什么?检查xml文件中的TextView属性,确保没有限制TextView的增长能力。将布局xml添加到问题中。@dmaxi消息变量是一个Str惯性导航与制导