Sunday, January 25, 2015

onButtonClick

11:51 AM





1
2
3
4
5
6
7
8
9
   public void onButtonClick(View v) {
EditText ei = (EditText)findViewById(R.id.editText);
EditText e2 = (EditText)findViewById(R.id.editText2);
TextView t1 = (TextView)findViewById(R.id.textView);
int a =Integer.parseInt(ei.getText().toString());
int b =Integer.parseInt(e2.getText().toString());
int sum = a+b;
t1.setText(Integer.toString(sum));
}





Written by

We are one of the initiators of the development of information technology in understanding the need for a solution that is familiar and close to us.

0 comments:

Post a Comment

 

© 2013 Klick Dev. All rights resevered.

Back To Top