0
我試圖在發生作用使用更改文本:Android的文字變化導致屏幕的其他部分不加載
final TextView textViewToChange = (TextView) findViewById(R.id.registerTextHeader);
textViewToChange.setText("Error getting seed! (" + message + ") TEXT HERE NOT SHOWING");
消息是一個字符串。以往這種變化被觸發但是當我得到:
「錯誤獲取種子(ERR1!」
當我希望得到:
「!錯誤獲取種子(ERR1)TEXT這裏沒有顯示」
佈局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>
什麼是消息變量的類型? – dmaxi 2012-02-20 17:57:30
檢查xml文件中的TextView屬性,並確保不限制TextView的增長能力。 – Luis 2012-02-20 18:02:49
發佈版式(xml)。 – Luis 2012-02-20 18:11:22