How to pass edittext value to another activity's edittext?

后端 未结 7 2086
闹比i
闹比i 2020-12-16 07:01

My project\'s requirement is : edittext value is first entered by user and that same value will be visible in another activity\'s editext , which should be read only..

相关标签:
7条回答
  • 2020-12-16 07:49

    You can send N number of data from one activity to other activity like below :

    Sneder : Current.java

    Intent values = new Intent(Current.this, Destination.class);
    //values.putExtra("KEY","VALUE");
    values.putExtra("USER_NAME",user_name);
    startActivity(values);
    finish();
    

    Receiver : Destination.java

    String value = getIntent().getStringExtra("USER_NAME");
    
    0 讨论(0)
提交回复
热议问题