I am wondering how to convert an edittext input to an int, I have the user input a number, it than divides it by 8.
MainActivity.java
@SuppressWarnin
First, find your EditText in the resource of the android studio by using this code:
EditText
EditText value = (EditText) findViewById(R.id.editText1);
Then convert EditText value into a string and then parse the value to an int.
string
int
int number = Integer.parseInt(x.getText().toString());
This will work