Skip to content

Commit

Permalink
Merge branch 'master' of github.com:sockeqwe/mosby
Browse files Browse the repository at this point in the history
  • Loading branch information
sockeqwe committed Mar 29, 2017
2 parents 0729cd9 + ba86a4c commit 510e145
Show file tree
Hide file tree
Showing 80 changed files with 211 additions and 196 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ With that said, if you want to report a bug or file a feature request, then go a

If you want to report an issue, please use the following template to make it easier for us to identify the bug:

### Mosby Version
**Mosby Version:**

### Expected behavior
**Expected behavior**

### Actual behavior (include a stacktrace if crash):
**Actual behavior (include a stacktrace if crash)**

### Steps to reproduce the behavior
**Steps to reproduce the behavior or link to a sample repository**
Original file line number Diff line number Diff line change
Expand Up @@ -54,58 +54,58 @@ public interface ActivityMviDelegate<V extends MvpView, P extends MviPresenter<V
* This method must be called from {@link Activity#onCreate(Bundle)}.
* This method internally creates the presenter and attaches the viewState to it.
*/
public void onCreate(Bundle bundle);
void onCreate(Bundle bundle);

/**
* This method must be called from {@link Activity#onDestroy()}}.
* This method internally detaches the viewState from presenter
*/
public void onDestroy();
void onDestroy();

/**
* This method must be called from {@link Activity#onPause()}
*/
public void onPause();
void onPause();

/**
* This method must be called from {@link Activity#onResume()}
*/
public void onResume();
void onResume();

/**
* This method must be called from {@link Activity#onStart()}
*/
public void onStart();
void onStart();

/**
* This method must be called from {@link Activity#onStop()}
*/
public void onStop();
void onStop();

/**
* This method must be called from {@link Activity#onRestart()}
*/
public void onRestart();
void onRestart();

/**
* This method must be called from {@link Activity#onContentChanged()}
*/
public void onContentChanged();
void onContentChanged();

/**
* This method must be called from {@link Activity#onSaveInstanceState(Bundle)}
*/
public void onSaveInstanceState(Bundle outState);
void onSaveInstanceState(Bundle outState);

/**
* This method must be called from {@link Activity#onPostCreate(Bundle)}
*/
public void onPostCreate(Bundle savedInstanceState);
void onPostCreate(Bundle savedInstanceState);

/**
* This method must be called from {@link FragmentActivity#onRetainCustomNonConfigurationInstance()}
*
* @return Don't forget to return the value returned by this delegate method
*/
public Object onRetainCustomNonConfigurationInstance();
Object onRetainCustomNonConfigurationInstance();
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,88 +61,88 @@ public interface FragmentMviDelegate<V extends MvpView, P extends MviPresenter<V
*
* @param saved The bundle
*/
public void onCreate(Bundle saved);
void onCreate(Bundle saved);

/**
* Must be called from {@link Fragment#onDestroy()}
*/
public void onDestroy();
void onDestroy();

/**
* Must be called from {@link Fragment#onViewCreated(View, Bundle)}
*
* @param view The inflated view
* @param savedInstanceState the bundle with the viewstate
*/
public void onViewCreated(View view, @Nullable Bundle savedInstanceState);
void onViewCreated(View view, @Nullable Bundle savedInstanceState);

/**
* Must be called from {@link Fragment#onDestroyView()}
*/
public void onDestroyView();
void onDestroyView();

/**
* Must be called from {@link Fragment#onPause()}
*/
public void onPause();
void onPause();

/**
* Must be called from {@link Fragment#onResume()}
*/
public void onResume();
void onResume();

/**
* Must be called from {@link Fragment#onStart()}
*/
public void onStart();
void onStart();

/**
* Must be called from {@link Fragment#onStop()}
*/
public void onStop();
void onStop();

/**
* Must be called from {@link Fragment#onActivityCreated(Bundle)}
*
* @param savedInstanceState The saved bundle
*/
public void onActivityCreated(Bundle savedInstanceState);
void onActivityCreated(Bundle savedInstanceState);

/**
* Must be called from {@link Fragment#onAttach(Activity)}
*
* @param activity The activity the fragment is attached to
*/
public void onAttach(Activity activity);
void onAttach(Activity activity);

/**
* Must be called from {@link Fragment#onAttach(Context)}
*
* @param context The context the fragment is attached to
*/
public void onAttach(Context context);
void onAttach(Context context);

/**
* Must be called from {@link Fragment#onDetach()}
*/
public void onDetach();
void onDetach();

/**
* Must be called from {@link Fragment#onSaveInstanceState(Bundle)}
*/
public void onSaveInstanceState(Bundle outState);
void onSaveInstanceState(Bundle outState);

/**
* Must be called from {@link Fragment#onAttachFragment(Fragment)}
*
* @param childFragment the new childFragment
*/
public void onAttachFragment(Fragment childFragment);
void onAttachFragment(Fragment childFragment);

/**
* Must be called from {@link Fragment#onConfigurationChanged(Configuration)}
*
* @param newConfig The new config
*/
public void onConfigurationChanged(Configuration newConfig);
void onConfigurationChanged(Configuration newConfig);
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ public interface MviDelegateCallback<V extends MvpView, P extends MviPresenter<V
*
* @return the created presenter instance
*/
@NonNull public P createPresenter();
@NonNull P createPresenter();

/**
* Get the MvpView for the presenter
*
* @return The viewState associated with the presenter
*/
@NonNull public V getMvpView();
@NonNull V getMvpView();

/**
* This method will be called to inform that restoring
Expand All @@ -55,5 +55,5 @@ public interface MviDelegateCallback<V extends MvpView, P extends MviPresenter<V
*
* @param restoringViewState true, if restoring view state is in progress, otherwise false
*/
public void setRestoringViewState(boolean restoringViewState);
void setRestoringViewState(boolean restoringViewState);
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,24 @@ public interface ViewGroupMviDelegate<V extends MvpView, P extends MvpPresenter<
/**
* Must be called from {@link View#onAttachedToWindow()}
*/
public void onAttachedToWindow();
void onAttachedToWindow();

/**
* Must be called from {@link View#onDetachedFromWindow()}
*/
public void onDetachedFromWindow();
void onDetachedFromWindow();

/**
* Must be called from {@link View#onRestoreInstanceState(Parcelable)}
*
* @param state The parcelable state
*/
public void onRestoreInstanceState(Parcelable state);
void onRestoreInstanceState(Parcelable state);

/**
* Save the instatnce state
*
* @return The state with all the saved data
*/
public Parcelable onSaveInstanceState();
Parcelable onSaveInstanceState();
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ public interface ViewGroupMviDelegateCallback<V extends MvpView, P extends MviPr
/**
* This method must call super.onSaveInstanceState() within any view
*/
public Parcelable superOnSaveInstanceState();
Parcelable superOnSaveInstanceState();

/**
* This methdo must call super.onRestoreInstanceState(state)
*
* @param state The parcelable containing the state
*/
public void superOnRestoreInstanceState(Parcelable state);
void superOnRestoreInstanceState(Parcelable state);

/**
* Get the context
*
* @return Get the context
* @since 3.0
*/
public Context getContext();
Context getContext();
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ public interface MvpLceView<M> extends MvpView {
* @param pullToRefresh true, if pull-to-refresh has been invoked loading.
*/
@UiThread
public void showLoading(boolean pullToRefresh);
void showLoading(boolean pullToRefresh);

/**
* Show the content view.
*
* <b>The content view must have the id = R.id.contentView</b>
*/
@UiThread
public void showContent();
void showContent();

/**
* Show the error view.
Expand All @@ -69,13 +69,13 @@ public interface MvpLceView<M> extends MvpView {
* false.
*/
@UiThread
public void showError(Throwable e, boolean pullToRefresh);
void showError(Throwable e, boolean pullToRefresh);

/**
* The data that should be displayed with {@link #showContent()}
*/
@UiThread
public void setData(M data);
void setData(M data);

/**
* Load the data. Typically invokes the presenter method to load the desired data.
Expand All @@ -88,5 +88,5 @@ public interface MvpLceView<M> extends MvpView {
* @param pullToRefresh true, if triggered by a pull to refresh. Otherwise false.
*/
@UiThread
public void loadData(boolean pullToRefresh);
void loadData(boolean pullToRefresh);
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,52 +53,52 @@ public interface ActivityMvpDelegate<V extends MvpView, P extends MvpPresenter<V
* This method must be called from {@link Activity#onCreate(Bundle)}.
* This method internally creates the presenter and attaches the view to it.
*/
public void onCreate(Bundle bundle);
void onCreate(Bundle bundle);

/**
* This method must be called from {@link Activity#onDestroy()}}.
* This method internally detaches the view from presenter
*/
public void onDestroy();
void onDestroy();

/**
* This method must be called from {@link Activity#onPause()}
*/
public void onPause();
void onPause();

/**
* This method must be called from {@link Activity#onResume()}
*/
public void onResume();
void onResume();

/**
* This method must be called from {@link Activity#onStart()}
*/
public void onStart();
void onStart();

/**
* This method must be called from {@link Activity#onStop()}
*/
public void onStop();
void onStop();

/**
* This method must be called from {@link Activity#onRestart()}
*/
public void onRestart();
void onRestart();

/**
* This method must be called from {@link Activity#onContentChanged()}
*/
public void onContentChanged();
void onContentChanged();

/**
* This method must be called from {@link Activity#onSaveInstanceState(Bundle)}
*/
public void onSaveInstanceState(Bundle outState);
void onSaveInstanceState(Bundle outState);

/**
* This method must be called from {@link Activity#onPostCreate(Bundle)}
*/
public void onPostCreate(Bundle savedInstanceState);
void onPostCreate(Bundle savedInstanceState);

}
Loading

0 comments on commit 510e145

Please sign in to comment.