public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_nada_saif_70126172); Button bq=(Button)findViewById(R.id.button2); EditText et1=(EditText)findViewById(R.id.editText1); EditText et2=(EditText)findViewById(R.id.editText2); final EditText et3=(EditText)findViewById(R.id.editText3); if (et2.requestFocus()) { bq.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub et3.setText(et3.getText()+"q"); final EditText et2=(EditText)findViewById(R.id.editText2); Button bsend=(Button)findViewById(R.id.button1); bsend.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub et2.setText(et3.getText()); } }); } }); } else //if // (et1.requestFocus()) bq.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub et3.setText(et3.getText()+"q"); final EditText et1=(EditText)findViewById(R.id.editText1); Button bsend=(Button)findViewById(R.id.button1); bsend.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub et1.setText(et3.getText()); } }); } });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)