Skip to content

Instantly share code, notes, and snippets.

@vishnusosale
Last active November 19, 2016 06:23
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 vishnusosale/8bcdf762c3fada6a51ae35d2262fe66f to your computer and use it in GitHub Desktop.
Save vishnusosale/8bcdf762c3fada6a51ae35d2262fe66f to your computer and use it in GitHub Desktop.
ChallengesContract is an agreement or contract between the View and Presenter
import android.database.Cursor;
/**
* The contract between the View and the Presenter
*/
public class ChallengesContract {
public interface View {
void showProgressBar();
void dismissProgressBar();
void showLayoutOnError(String message);
void showLayoutOnSuccess();
void showLayoutOnProgress();
void showChallenges(Cursor cursor);
void showLayoutOnEmpty();
}
public interface Presenter {
void start();
void clearOldChallenges();
void getChallenges();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment