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

后端 未结 7 2101
闹比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:41

    public EditText var_name; 
    
    var_name=(EditText)findViewById(R.id.input_id);
    
    publc void function_name(){
        Intent i=new Intent(this, class_name.class);
        String s=this.edittext_var_name.getString().toString();
        i.putExtra("var_name","s");
        startActivity(i);
        }`
    

提交回复
热议问题