Class FeedbackBottomSheet
-
- All Implemented Interfaces:
-
android.animation.Animator.AnimatorListener,android.content.ComponentCallbacks,android.content.DialogInterface.OnCancelListener,android.content.DialogInterface.OnDismissListener,android.view.View.OnCreateContextMenuListener,androidx.activity.result.ActivityResultCaller,androidx.lifecycle.HasDefaultViewModelProviderFactory,androidx.lifecycle.LifecycleOwner,androidx.lifecycle.ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner
public class FeedbackBottomSheet extends BottomSheetDialogFragment implements Animator.AnimatorListener
A BottomSheetDialogFragment shows Feedback UI with different feedback categories.
This view takes a FeedbackBottomSheetListener. The onFeedbackSelected will be called when a feedback category is selected. The onFeedbackDismissed will be called when this fragment dismiss.
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringTAGpublic final static intSTYLE_NORMALpublic final static intSTYLE_NO_TITLEpublic final static intSTYLE_NO_FRAMEpublic final static intSTYLE_NO_INPUTpublic StringmPreviousWho
-
Constructor Summary
Constructors Constructor Description FeedbackBottomSheet()
-
Method Summary
Modifier and Type Method Description static FeedbackBottomSheetnewInstance(FeedbackBottomSheetListener feedbackBottomSheetListener, long duration)voidonCreate(@Nullable() Bundle savedInstanceState)ViewonCreateView(@NonNull() LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)voidonViewCreated(@NonNull() View view, @Nullable() Bundle savedInstanceState)DialogonCreateDialog(Bundle savedInstanceState)voidonDismiss(@NotNull() DialogInterface dialog)voidonDestroyView()voidonSaveInstanceState(@NonNull() Bundle outState)voidonResume()voidonAnimationEnd(Animator animation)voidonCancel(@NonNull() DialogInterface dialog)voidonAnimationStart(Animator animation)voidonAnimationCancel(Animator animation)voidonAnimationRepeat(Animator animation)voidsetFeedbackBottomSheetListener(FeedbackBottomSheetListener feedbackBottomSheetListener)voidsetDuration(long duration)-
Methods inherited from class com.google.android.material.bottomsheet.BottomSheetDialogFragment
dismiss, dismissAllowingStateLoss -
Methods inherited from class android.animation.Animator.AnimatorListener
onAnimationEnd, onAnimationStart -
Methods inherited from class androidx.appcompat.app.AppCompatDialogFragment
setupDialog -
Methods inherited from class androidx.fragment.app.DialogFragment
dismissNow, getDialog, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onDetach, onGetLayoutInflater, onStart, onStop, onViewStateRestored, requireComponentDialog, requireDialog, setCancelable, setShowsDialog, setStyle, show, show, showNow -
Methods inherited from class androidx.fragment.app.Fragment
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelCreationExtras, getDefaultViewModelProviderFactory, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getParentFragmentManager, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSavedStateRegistry, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hasOptionsMenu, hashCode, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityResult, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, postponeEnterTransition, registerForActivityResult, registerForContextMenu, requestPermissions, requireActivity, requireArguments, requireContext, requireFragmentManager, requireHost, requireParentFragment, requireView, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
newInstance
@NonNull() static FeedbackBottomSheet newInstance(FeedbackBottomSheetListener feedbackBottomSheetListener, long duration)
-
onCreateView
View onCreateView(@NonNull() LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
-
onViewCreated
void onViewCreated(@NonNull() View view, @Nullable() Bundle savedInstanceState)
-
onCreateDialog
@NonNull() Dialog onCreateDialog(Bundle savedInstanceState)
-
onDismiss
void onDismiss(@NotNull() DialogInterface dialog)
-
onDestroyView
void onDestroyView()
-
onSaveInstanceState
void onSaveInstanceState(@NonNull() Bundle outState)
-
onResume
void onResume()
-
onAnimationEnd
void onAnimationEnd(Animator animation)
-
onCancel
void onCancel(@NonNull() DialogInterface dialog)
-
onAnimationStart
void onAnimationStart(Animator animation)
-
onAnimationCancel
void onAnimationCancel(Animator animation)
-
onAnimationRepeat
void onAnimationRepeat(Animator animation)
-
setFeedbackBottomSheetListener
void setFeedbackBottomSheetListener(FeedbackBottomSheetListener feedbackBottomSheetListener)
-
setDuration
void setDuration(long duration)
- Parameters:
duration- in milliseconds, the BottomSheet will show before being dismissed.
-
-