12-01 00:36:28.058: E/AndroidRuntime(5062): Caused by: java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.EditText
如果有人知道,我会遇到错误然后告诉我......我将非常感谢
爪哇:
Log.d("Textra", title);
Log.d("Dextra", des);
EditText t=(EditText) findViewById(R.id.t);
EditText d=(EditText) findViewById(R.id.des);
t.setText(title);
d.setText(des);
XML:
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/t"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/des"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""/>
</LinearLayout>