-1

I want to print the answer on a text view I have set up on my main app screen, I have tried researching it again and again and I cant find a clear way to do it. I'm not getting any errors either. How would I get the answer to print into the textview?

    switch (v.getId()){
        case R.id.Calculate:
            oper = "*";
            result = Length * Width;
            break;
            default:
                break;

    }

    AreaOut???

AreaOut is the TextView box I have set up.. When the Calculate button is pressed, it should automatically calculate the area and then display into the AreaOut TextView box. But no matter what I do it doesn't display.

noob
  • 1
  • 3
  • Possible duplicate of [Android how to print a array in text view or anything](https://stackoverflow.com/questions/9668041/android-how-to-print-a-array-in-text-view-or-anything) – Ali Mar 26 '18 at 16:09

1 Answers1

0

Try:

AreaOut.setText(String.valueOf(result));
petrrr33
  • 583
  • 9
  • 24