I am new to android development. I am creating an app in which attendance percentage needs to be calculated. I want to calculate the attendance percentage and place that data in the EDIT TEXT field but when I run the application the data is not calculated instead I have to insert it manually. Please help me out with this. TIA :) Here is my code
float percentage = ((attendClasses / totClasses) * 100);
str_percentage = String.valueOf(percentage);
ed_percentage.setText(str_percentage);
// To insert candidate values into the database
boolean result = mySQLiteAdapter.onInsertAttendance(
studId, subjId, str_totclasses,
str_attendedclasses, str_percentage);