I have an EditText that only accepts numerical input and I am using the following code to turn that input to a string so I can use it later.
scoreString = Integer.parseInt(teamScore.getText().toString());
The problem is... when I use a setText(), it only says "0" in:
previewText.setText( scoreString + " :");
Why won't the integer say what the user put in the edittext?
EDIT: If I'm using a setText with a ton of strings (6-8 strings in it), will this disrupt the ability to use the number in there?
-I even collected the final chunk of strings and made them into one whole string, THEN used the setText as the finalOutput and it didn't work (see below)
finalOutput = (sportName + ": " + team1NameString
+ " " + team1ScoreString + ", " + team2NameString + " "
+ team2ScoreString + " - " + quarterString + " "
+ descriptionString);
generatePreview.setText(finalOutput + "");
(sorry I keep changing variable names, just pay attention to the format)
Integer.parseInt(teamScore.getText().toString().trim())