Skip to content

Instantly share code, notes, and snippets.

@vestrel00
Created July 28, 2017 15:07
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 vestrel00/0e5e03ee4ebcf811faa0c0b818d0f943 to your computer and use it in GitHub Desktop.
Save vestrel00/0e5e03ee4ebcf811faa0c0b818d0f943 to your computer and use it in GitHub Desktop.
C: 1 - ui/common/presenter/Presenter.java
public interface Presenter {
/**
* Starts the presentation. This should be called in the view's (Activity or Fragment)
* onCreate() or onViewStatedRestored() method respectively.
*
* @param savedInstanceState the saved instance state that contains state saved in
* {@link #onSaveInstanceState(Bundle)}
*/
void onStart(@Nullable Bundle savedInstanceState);
/**
* Resumes the presentation. This should be called in the view's (Activity or Fragment)
* onResume() method.
*/
void onResume();
/**
* Pauses the presentation. This should be called in the view's Activity or Fragment)
* onPause() method.
*/
void onPause();
/**
* Save the state of the presentation (if any). This should be called in the view's
* (Activity or Fragment) onSaveInstanceState().
*
* @param outState the out state to save instance state
*/
void onSaveInstanceState(Bundle outState);
/**
* Ends the presentation. This should be called in the view's (Activity or Fragment)
* onDestroy() or onDestroyView() method respectively.
*/
void onEnd();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment