How do you pass data/parameters to another activity in Android

前端 未结 2 1169
心在旅途
心在旅途 2021-01-25 09:29

How to pass data/parameter values from one activity to another in android?

I have used

loginname=txtloginname.getText().toString();
password=txtpassword         


        
2条回答
  •  悲&欢浪女
    2021-01-25 09:45

    You can just say newIntent.putExtra("name",value); use it multiple times to add multiple data. And depending on the data you stored call getStringExtra("name"); in the next activity.

提交回复
热议问题