I'm a beginner in Android Studio and need to make an app that gets a number in EditText and then tell me if it's even or odd, it follows my current code: I do not know what and where to put it to when I hit the button (I already did) have this result ... Help
public class exercicio1 extends AppCompatActivity {
TextView tInforme;
EditText tValor;
Button btDescobrir;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_exercicio1);
tInforme = (TextView) findViewById(R.id.tInforme);
tValor = (EditText) findViewById(R.id.tValor);
btDescobrir = (Button) findViewById(R.id.btDescobrir);}
public void setbtDescobrir(View v) {
String guessStr = tValor.getText().toString();
int theGuess = Integer.parseInt(guessStr);
}}