public abstract class PluginCompatActivity<T_Presenter extends Presenter> extends ViewCompatActivity<T_Presenter> implements FeatureContainer, FeatureContainerProvider, PluginComponent
PluginCompatActivity extends ViewCompatActivity to provide an abstract base class
for implementing Activity classes that utilise Robopupu.Plugin library.binder, scope, stateKEY_DEPENDENCY_SCOPE| Modifier | Constructor and Description |
|---|---|
protected |
PluginCompatActivity() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canGoBack()
Tests if the previous
FeatureView can be popped from the back stack. |
boolean |
canShowView(FeatureView view)
Tests if the given
FeatureView can be shown by this FeatureTransitionManager. |
void |
clearBackStack(java.util.HashMap<java.lang.String,FeatureView> backStackViews)
Clears
FeatureViews of contained Feature from the back stack. |
protected FeatureContainer |
createFeatureContainer(int containerViewId) |
protected void |
createFeatureContainers(java.util.List<FeatureContainer> featureContainers) |
int |
getContainerViewId()
Note: This method has to be overridden in extended classes which act as FeatureContainers
themselves.
|
android.content.Context |
getContext()
Gets the
Context available for FeatureCompatFragments |
java.util.List<FeatureContainer> |
getFeatureContainers() |
java.lang.String |
goBack()
Pops the previous
FeatureView from the back stack. |
void |
onPlugged(PluginBus bus)
Invoked when this
PluginComponent has been plugged to given PluginBus. |
void |
onPluginPlugged(java.lang.Object plugin)
Invoked when the given plugin object has been plugged to
PluginBus. |
void |
onPluginUnplugged(java.lang.Object plugin)
Invoked when the given plugin object has been unplugged from
PluginBus. |
protected void |
onStart() |
protected void |
onStop() |
void |
onUnplugged(PluginBus bus)
Invoked when this
PluginComponent has been unplugged from given PluginBus. |
void |
removeView(FeatureView featureView,
boolean addedToBackstack,
java.lang.String fragmentTag)
Removes the given
FeatureView from its container. |
void |
showView(FeatureView featureView,
boolean addToBackStack,
java.lang.String fragmentTag)
Shows the given
FeatureView. |
void |
showView(FeatureView featureView,
int containerViewId,
boolean addToBackStack,
java.lang.String fragmentTag)
Shows the given
FeatureView. |
bind, bind, bind, canCommitFragment, getPresenter, getScope, getState, getView, getViewTag, onCreate, onCreateBindings, onDestroy, onPause, onRequestPermissionsResult, onRestart, onRestoreDependencies, onRestoreInstanceState, onRestoreState, onResume, onSaveDependencies, onSaveInstanceState, onSaveState, resolvePresenter, setScopeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanCommitFragment, getResourcesprotected void createFeatureContainers(java.util.List<FeatureContainer> featureContainers)
public android.content.Context getContext()
FeatureContainerContext available for FeatureCompatFragmentsgetContext in interface FeatureContainerContext.public java.util.List<FeatureContainer> getFeatureContainers()
getFeatureContainers in interface FeatureContainerProviderprotected FeatureContainer createFeatureContainer(int containerViewId)
public int getContainerViewId()
getContainerViewId in interface FeatureContainerpublic boolean canGoBack()
FeatureContainerFeatureView can be popped from the back stack.canGoBack in interface FeatureContainerboolean value.public boolean canShowView(FeatureView view)
FeatureTransitionManagerFeatureView can be shown by this FeatureTransitionManager.canShowView in interface FeatureTransitionManagerview - A FeatureView.boolean.public void showView(FeatureView featureView, boolean addToBackStack, java.lang.String fragmentTag)
FeatureTransitionManagerFeatureView. If parameter fragmentTag is given null
value, implementation of this method should use the View.getViewTag() method
to obtain the tag.showView in interface FeatureTransitionManagerfeatureView - A FeatureView. May not be null.addToBackStack - A boolean value specifying if the FeatureView is added
to back stack.fragmentTag - A tag for the Fragment. May be null.public void showView(FeatureView featureView, int containerViewId, boolean addToBackStack, java.lang.String fragmentTag)
FeatureContainerProviderFeatureView. If parameter fragmentTag is given null
value, implementation of this method should use the View.getViewTag() method
to obtain the tag.showView in interface FeatureContainerProviderfeatureView - A FeatureView. May not be null.containerViewId - The layout ID of the container ViewGroup.addToBackStack - A boolean value specifying if the FeatureView is added
to back stack.fragmentTag - A tag for the Fragment. May be null.public void removeView(FeatureView featureView, boolean addedToBackstack, java.lang.String fragmentTag)
FeatureTransitionManagerFeatureView from its container.removeView in interface FeatureTransitionManagerfeatureView - A FeatureView. May not be null.addedToBackstack - A boolean value specifying if the FeatureView was
added to back stack.fragmentTag - The tag that was used in adding the Fragment. May be null,
if no tag was given when adding the Fragment.public void clearBackStack(java.util.HashMap<java.lang.String,FeatureView> backStackViews)
FeatureContainerFeatureViews of contained Feature from the back stack.clearBackStack in interface FeatureContainerbackStackViews - A HashMap containing the backpublic java.lang.String goBack()
FeatureContainerFeatureView from the back stack.goBack in interface FeatureContainerFeatureView. May return null.protected void onStart()
onStart in class ViewCompatActivity<T_Presenter extends Presenter>protected void onStop()
onStop in class ViewCompatActivity<T_Presenter extends Presenter>public void onPlugged(PluginBus bus)
PluginComponentPluginComponent has been plugged to given PluginBus.onPlugged in interface PluginComponentbus - A PluginBus.public void onUnplugged(PluginBus bus)
PluginComponentPluginComponent has been unplugged from given PluginBus.onUnplugged in interface PluginComponentbus - A PluginBus.public void onPluginPlugged(java.lang.Object plugin)
PluginComponentPluginBus.onPluginPlugged in interface PluginComponentplugin - A plugin as a Object.public void onPluginUnplugged(java.lang.Object plugin)
PluginComponentPluginBus.onPluginUnplugged in interface PluginComponentplugin - A plugin as a Object.