how to covert edittext datatype to an integer ?

A

AC Question

name = (EditText) findViewById(R.id.editText_name);
mob = (EditText) findViewById(R.id.editText2_mob);
pmob = (EditText) findViewById(R.id.editText3_pmob);
course = (EditText) findViewById(R.id.editText4_course);

result= (TextView) findViewById(R.id.result);
dbHandler = new DBHandler(this, null, null, 1);
printDatabase();
}

//Add a product to the database
public void addButtonClicked(View view){

//showing error msg int his line below
Students student= new Students(name.getText().toString(),mob.getText(),pmob.getText(),course.getText().toString());
dbHandler.addToDB(student);
printDatabase();
}
 

Trending Posts

Forum statistics

Threads
943,117
Messages
6,917,360
Members
3,158,829
Latest member
ParkerAdams