12-01 00:36:28.058: E/AndroidRuntime(5062): Caused by: java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.EditText
I am getting above error if anyone knows then tell me ...i shall very thankful
Java:
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>
Delete R.java Clean project Save files Build & Run
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With