public class FeatureContainerAdapter extends java.lang.Object implements FeatureContainer
FeatureContainerAdapter provides an adapter class for implementing
FeatureContainers.| Constructor and Description |
|---|
FeatureContainerAdapter(FeatureContainerProvider provider) |
FeatureContainerAdapter(FeatureContainerProvider provider,
int containerViewId) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCommitFragment()
Tests if a
Fragment can be committed. |
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. |
static FeatureContainerAdapter |
create(FeatureContainerProvider provider,
int containerViewId) |
int |
getContainerViewId()
Gets the container
ViewGroup ID for this FeatureContainer. |
android.content.Context |
getContext()
Gets the
Context available for FeatureCompatFragments |
android.content.res.Resources |
getResources()
Gets the
Resources available for FeatureCompatFragments |
java.lang.String |
goBack()
Pops the previous
FeatureView from the back stack. |
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. |
public FeatureContainerAdapter(FeatureContainerProvider provider)
public FeatureContainerAdapter(FeatureContainerProvider provider, int containerViewId)
public static FeatureContainerAdapter create(FeatureContainerProvider provider, int containerViewId)
public android.content.Context getContext()
FeatureContainerContext available for FeatureCompatFragmentsgetContext in interface FeatureContainerContext.public int getContainerViewId()
FeatureContainerViewGroup ID for this FeatureContainer.getContainerViewId in interface FeatureContainerint constant.public android.content.res.Resources getResources()
FeatureContainerResources available for FeatureCompatFragmentsgetResources in interface FeatureContainerResources.public boolean canCommitFragment()
FeatureContainerFragment can be committed. A Fragment cannot be committed
using FragmentTransaction.commit() after method Activity.onSaveInstanceState(Bundle)
has been invoked.canCommitFragment in interface FeatureContainerboolean value.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 boolean canGoBack()
FeatureContainerFeatureView can be popped from the back stack.canGoBack in interface FeatureContainerboolean value.public java.lang.String goBack()
FeatureContainerFeatureView from the back stack.goBack in interface FeatureContainerFeatureView. May return null.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 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.