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!
You have to create a variable for your TextView and then set the text.