First of all get a string from an EDITTEXT and then convert this string into integer like
String no=myTxt.getText().toString(); //this will get a string
int no2=Integer.parseInt(no); //this will get a no from the string