Created
July 28, 2019 03:03
-
-
Save Guilherme-HRamos/fa37ec8e9aca70dd25f6721b4456f346 to your computer and use it in GitHub Desktop.
Medium - Android/Java Interfaces like a Boss! - Backwards Compatibility New Method ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface BaseViewContract { | |
void onShowLoading(); | |
void onHideLoading(); | |
void onShowError(String error); | |
default void onShowToast(String message) { | |
Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show(); | |
} | |
Context getApplicationContext(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment