In my application i have 3 edit text boxes ,in that in first two edit boxes user will enter the input.
In the third edit text box i have to multiply these two values and i have to display when the user touch the third edit text box.
Please anybody help me.
I tried for this:
total.setOnKeyListener(new View.OnKeyListener() {
@Override
public boolean onKey(View arg0, int arg1, KeyEvent arg2) {
// TODO Auto-generated method stub
System.out.println("insidefocus");
String tot=String.valueOf((Integer.parseInt(price.getText().toString()))*(Integer.parseInt(qty.getText().toString())));
System.out.println("tot="+tot);
total.setText(tot);
return false;
}
});
use can use onClickListener instead of onKeyListener and do ur functionlity like adding two textbox values and set the result in third textbox.