Hope you are well. Could you help me with the below code.
I would like to make sure that a user Inputs a value into the edtScore and it is not left blank before they hit the Save Button. Currently the user can hit the save button even if the edtScore is left blank.
Thanks for the Help.
public void saveLogOnClick (View view){
String FILENAME = "results.csv"; //Stores onto Mobile Phone Storage Space
String entry = edtDate.getText().toString() + "," +
edtTime.getText().toString() + "," +
category.getSelectedItem().toString() + "," +
edtScore.getText().toString() +"\n";
try{
FileOutputStream out = openFileOutput(FILENAME, Context.MODE_APPEND);
out.write(entry.getBytes());
out.close();
toastIt("Entry Saved");
} catch (Exception e){
e.printStackTrace();
}
}