enter image description here
//Getting the edittext and button instance edittext1=(EditText)findViewById(R.id.editText1); button1=(Button)findViewById(R.id.button1); //Performing action on button click button1.setOnClickListener(new OnClickListener(){ @Override public void onClick(View arg0) { String number=edittext1.getText().toString(); Intent callIntent = new Intent(Intent.ACTION_CALL); callIntent.setData(Uri.parse("tel:"+number)); startActivity(callIntent); } }); }
The code in this section will run in the app, But I want this code to be saved as xml file and saved as above picture. To call later. I'm a beginner Please advise me.
1.4m articles
1.4m replys
5 comments
57.0k users