public class BottomSheetFragment extends android.support.v4.app.Fragment implements BottomSheetFragmentInterface
BottomSheetLayout. Like a DialogFragment, you can show this either in a bottom sheet by using
show(FragmentManager, int) or attach it to a view with the normal fragment transaction
methods.
If you don't want to extend from this for your fragment instance, you can use BottomSheetFragmentDelegate
in your fragment implementation instead. You must, however, still implement BottomSheetFragmentInterface.
| Constructor and Description |
|---|
BottomSheetFragment() |
| Modifier and Type | Method and Description |
|---|---|
void |
dismiss()
Dismiss the fragment and it's bottom sheet.
|
void |
dismissAllowingStateLoss()
Version of
BottomSheetFragmentInterface.dismiss() that uses FragmentTransaction.commitAllowingStateLoss(). |
android.view.LayoutInflater |
getLayoutInflater(android.os.Bundle savedInstanceState) |
com.flipboard.bottomsheet.ViewTransformer |
getViewTransformer()
Override this to proved a custom
ViewTransformer. |
void |
onActivityCreated(android.os.Bundle savedInstanceState) |
void |
onAttach(android.content.Context context) |
void |
onCreate(android.os.Bundle savedInstanceState) |
void |
onDestroyView() |
void |
onDetach() |
void |
onSaveInstanceState(android.os.Bundle outState) |
void |
onStart() |
void |
show(android.support.v4.app.FragmentManager manager,
int bottomSheetLayoutId)
Display the bottom sheet, adding the fragment to the given FragmentManager.
|
int |
show(android.support.v4.app.FragmentTransaction transaction,
int bottomSheetLayoutId)
Display the bottom sheet, adding the fragment using an excising transaction and then
committing the transaction.
|
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onStop, onViewCreated, onViewStateRestored, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, toString, unregisterForContextMenupublic void show(android.support.v4.app.FragmentManager manager,
@IdRes
int bottomSheetLayoutId)
show in interface BottomSheetFragmentInterfacemanager - The FragmentManager this fragment will be added to.bottomSheetLayoutId - The bottom sheet layoutId in the parent view to attach the
fragment to.public int show(android.support.v4.app.FragmentTransaction transaction,
@IdRes
int bottomSheetLayoutId)
show in interface BottomSheetFragmentInterfacetransaction - An existing transaction in which to add the fragment.bottomSheetLayoutId - The bottom sheet layoutId in the parent view to attach the
fragment to.public void dismiss()
dismiss in interface BottomSheetFragmentInterfacepublic void dismissAllowingStateLoss()
BottomSheetFragmentInterface.dismiss() that uses FragmentTransaction.commitAllowingStateLoss().
See linked documentation for further details.dismissAllowingStateLoss in interface BottomSheetFragmentInterfacepublic com.flipboard.bottomsheet.ViewTransformer getViewTransformer()
ViewTransformer.getViewTransformer in interface BottomSheetFragmentInterfacepublic void onAttach(android.content.Context context)
onAttach in class android.support.v4.app.Fragmentpublic void onDetach()
onDetach in class android.support.v4.app.Fragmentpublic void onCreate(android.os.Bundle savedInstanceState)
onCreate in class android.support.v4.app.Fragmentpublic android.view.LayoutInflater getLayoutInflater(android.os.Bundle savedInstanceState)
getLayoutInflater in class android.support.v4.app.Fragmentpublic void onActivityCreated(@Nullable
android.os.Bundle savedInstanceState)
onActivityCreated in class android.support.v4.app.Fragmentpublic void onStart()
onStart in class android.support.v4.app.Fragmentpublic void onSaveInstanceState(android.os.Bundle outState)
onSaveInstanceState in class android.support.v4.app.Fragmentpublic void onDestroyView()
onDestroyView in class android.support.v4.app.Fragment