Skip to content

Instantly share code, notes, and snippets.

@Guilherme-HRamos
Last active July 28, 2019 02:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Guilherme-HRamos/e8aa2821b5e9354564b1878c340555cb to your computer and use it in GitHub Desktop.
Save Guilherme-HRamos/e8aa2821b5e9354564b1878c340555cb to your computer and use it in GitHub Desktop.
Medium - Android/Java Interfaces like a Boss! - Backwards Compatibility New Method
public interface BaseViewContract {
void onShowLoading();
void onHideLoading();
void onShowError(String error);
default void onShowToast(Context context, String message) {
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment