I’ve got a user input dialog box which I’m using to update a value.
byte valScoreAway = 0;
The value of valScoreAway is displayed on the screen with:
tvScoreAway.setText( valScoreAway );
This works perfectly.
During the program the score will increment when the TextView tvScoreAway is clicked.
This works perfectly.
If there is an error, I have it so that a onLongClickListerner() will inflate a dialog box with an edit field. The user will enter the correct value into the EditView and then click OK. When the OK button is click, I am trying to assign the user inputted value to valScoreAway but it is failing because valScoreAway is a byte type and userInput.getText() is returning a string.
Basically, I need to convert the value of userInput.getText() to a byte type.
Can someone please help me with this?
1 Answer