sanjaykuamr27
Lurker
public void doAction(View v)
{
EditText et = (EditText) findViewById(R.id.tf);
String k = (String) v.getTag();
CharSequence s = et.getText().append((CharSequence)k);
et.setText(s);
}
Why the above code is not giving me the result?
Im trying to create a simple calculator. When any button is pressed the doAction() should execute. Now im getting the value on the button using v.getTag(). Then im trying to append it to the present string.
But im not getting the result.
Whts problem with the above coed?
how can i fix that?
{
EditText et = (EditText) findViewById(R.id.tf);
String k = (String) v.getTag();
CharSequence s = et.getText().append((CharSequence)k);
et.setText(s);
}
Why the above code is not giving me the result?
Im trying to create a simple calculator. When any button is pressed the doAction() should execute. Now im getting the value on the button using v.getTag(). Then im trying to append it to the present string.
But im not getting the result.
Whts problem with the above coed?
how can i fix that?