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

后端 未结 7 2118
闹比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:32

    Hope this will help full for you.

    This code for second activity where you want to show the Data from First Activity.

     String mUrl = getIntent().getStringExtra("LinkingWord");
     editTextURL.setText(getIntent().getStringExtra("LinkingWord"));
    

    Don't forget to call EditText ID

      EditText editTextURL = findViewById(R.id.edit_url);
    

    Easy Peasy

    HappyCoding

提交回复
热议问题