Skip to content

Instantly share code, notes, and snippets.

@TheBaileyBrew
Created September 11, 2018 20:47
Show Gist options
  • Save TheBaileyBrew/17d10e8af62ef90c52914076ba8144a9 to your computer and use it in GitHub Desktop.
Save TheBaileyBrew/17d10e8af62ef90c52914076ba8144a9 to your computer and use it in GitHub Desktop.
if (mCurrentBookUri == null) {
Toast.makeText(this,getString(R.string.not_save_msg), Toast.LENGTH_SHORT).show();
}
if (TextUtils.isEmpty(nameString)){
Toast.makeText(this, getString(R.string.enter_name_req),Toast.LENGTH_SHORT).show();
return;
}
if (TextUtils.isEmpty(priceString)){
Toast.makeText(this, getString(R.string.enter_price_req),Toast.LENGTH_SHORT).show();
return;
}
if (TextUtils.isEmpty(supplierString)){
Toast.makeText(this,getString(R.string.enter_supplier_req),Toast.LENGTH_SHORT).show();
return;
}
if (TextUtils.isEmpty(phoneString)){
Toast.makeText(this, getString(R.string.enter_phone_req),Toast.LENGTH_SHORT).show();
return;
}
} else {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment