I am trying to pass a string from one activity to another. I retrieved the information like this:
Intent openReadMail = getIntent();
String readfrom = openReadMail.getStringExtra("from");
Now I want to display this string on screen. I this xml TextView element:
<TextView
android:id="@+id/from"
android:layout_width="match_parent"/>
but I can't convert the string to a textview, is there a better way of doing this? thanks for your help guys!
TextViewshould have alayout_height=""attribute as well, otherwise you may get an exception.