/** dateValid - prints out if the file is valid in a textview */ public void dateValid() { // update the textfield if the File is valid or not. if (currencyModel.dateValidFile()) { textViews.get(2).setText("File is up to date."); } else { textViews.get(2).setText("File is not updated."); } }
@Override protected void onStart() { super.onStart(); // update the textview with update info!! // inform user that the File is up to date or not. dateValid(); // UpdateEnabled must be true first // if file does not exist or the file is old - download a newer version if ((!currencyModel.fileExists() || !currencyModel.dateValidFile()) && currencyModel.isUpdateEnabled()) { currencyModel.download(); } else { // if the file is valid, update the spinners with those items. currencyModel.updateSpinners(); } }