Displaying server's response on activity as textview
I am making a social app in which I am getting response from server side.. i.e emails of profilr friends. I want to take that response to next activity and display as the textview. How to do this?? Can anyone help me over this?开发者_运维百科?
In firstActivity.java
take the response in String and then pass the value to secondActivity.java
with the help of Intent.putExtra
and fetch, assign to the related TextView
To Put
Intent i = new Intent(firstActivity.this, secondActivity.class);
i.putExtra("key", responseString);
startActivity(i);
To fetch
String stringOnTextView =getIntent().getExtras().getString("key");
精彩评论