从获得第一个活动数据在Android的第四项活动第一个、第四项、数据、Android

2023-09-12 06:02:04 作者:少爷。

我想文字写成的EditText第一个活动,并设置文本到另一个的EditText这是第四次活动​​。

i want to get text written in the EditText first activity and set that text to the another EditText which is fourth activity.

推荐答案

使用这种code在你的第一个活动。

Use this code in your first activity

Intent intent = new Intent(context,Viewnotification.class);
          intent.putExtra("Value1", youredittextvalue.getText().toString());
startActiviy(intent);

而在你的第四个活动

And in your fourth Activity

Bundle extras = getIntent().getExtras();
        String value1 = extras.getString("Value1");
yourfourthactivityedittext.setText(value1);
 
精彩推荐
图片推荐