开发者

Displaying server's response on activity as textview

开发者 https://www.devze.com 2023-04-11 14:21 出处:网络
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.

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");
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号