I have an app which at current will on the press of a button eg. the number 1 button change a text view to have the number 1 in it. What i need to do is append the view so that say when the number 3 is pressed the text view will say 13 instea of just 3. Here is the switch statement i'm using to handle the button presses.
@Override
public void onClick(View c) {
switch (c.getId())
{
case R.id.keypad_1:
TextView prs1 = (TextView) findViewById(R.id.diff);
prs1.setText("1");
}
}
Use the TextView.append() method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With