Sheet

abstract class Sheet : SheetFragment

This class is the base of all types of sheets. You can implement this class in your own and build your own custom sheet with the already existing features which the base class offers.

Constructors

Link copied to clipboard
fun Sheet()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun addAddOnComponent(addOnComponent: AddOnComponent)
Link copied to clipboard
fun addOnCreateViewListener(onCreateViewListeners: OnViewCreatedListener)
Link copied to clipboard
fun behavior(behavior: Int)

Set the BottomSheetBehavior state.

Link copied to clipboard
fun borderColor(strokeColor: Int)

Set the border stroke color around the sheet. If no color is set, the primary color is used.

Link copied to clipboard
fun borderWidth(strokeWidthDp: Float)
fun borderWidth(@DimenRes strokeWidthDpRes: Int)

Set the border stroke width

Link copied to clipboard
fun cancelableOutside(cancelable: Boolean)

Set if sheet is cancelable outside.

Link copied to clipboard
fun closeIconButton(iconButton: IconButton)

Set the Close Button Drawable.

Link copied to clipboard
fun cornerFamily(cornerFamily: Int)

Set the CornerFamily. Overrides the style default.

Link copied to clipboard
fun cornerRadius(cornerRadiusInDp: Float)
fun cornerRadius(@DimenRes cornerRadiusInDpRes: Int)

Set the corner radius in dp. Overrides the style default.

Link copied to clipboard
fun customLayoutHeight(customLayoutHeight: Int)

Set the height of the custom sheet layout.

Link copied to clipboard
open override fun dismiss()
Link copied to clipboard
open fun dismissAllowingStateLoss()
Link copied to clipboard
fun displayCloseButton(displayCloseButton: Boolean = true)

Display the close button left of the title. Overrides the style default.

Link copied to clipboard
fun displayHandle(displayHandle: Boolean = true)

Display the handle. Overrides the style default.

Link copied to clipboard
fun displayNegativeButton(displayNegativeButton: Boolean)

Display the negative button.

Link copied to clipboard
fun displayPositiveButton(displayPositiveButton: Boolean)

Display the positive button.

Link copied to clipboard
fun displayToolbar(displayToolbar: Boolean = true)

Display the toolbar. The toolbar consists of the close icon button, the title, the divider and the optional icon buttons. Overrides the style default.

Link copied to clipboard
fun draggable(draggable: Boolean)

Set if bottom-sheet is draggable. Only works with SheetStyle.BOTTOM_SHEET.

Link copied to clipboard
open fun dump(    @NonNull p0: String,     @Nullable p1: FileDescriptor?,     @NonNull p2: PrintWriter,     @Nullable p3: Array<String>?)
Link copied to clipboard
operator override fun equals(@Nullable other: Any?): Boolean
Link copied to clipboard
fun getActivity(): FragmentActivity?
Link copied to clipboard
fun getActualCornerFamily(): Int
Link copied to clipboard
fun getActualCornerRadius(): Float
Link copied to clipboard
open fun getAllowEnterTransitionOverlap(): Boolean
Link copied to clipboard
open fun getAllowReturnTransitionOverlap(): Boolean
Link copied to clipboard
fun getArguments(): Bundle?
Link copied to clipboard
fun getChildFragmentManager(): FragmentManager
Link copied to clipboard
open fun getContext(): Context?
Link copied to clipboard
fun <T> getCoverAnimationView(): T?
Link copied to clipboard
open override fun getDefaultViewModelProviderFactory(): ViewModelProvider.Factory
Link copied to clipboard
open fun getDialog(): Dialog?
Link copied to clipboard
open fun getEnterTransition(): Any?
Link copied to clipboard
open fun getExitTransition(): Any?
Link copied to clipboard
fun getFragmentManager(): FragmentManager?
Link copied to clipboard
fun getHost(): Any?
Link copied to clipboard
fun getId(): Int
Link copied to clipboard
fun getLayoutInflater(): LayoutInflater
Link copied to clipboard
open override fun getLifecycle(): Lifecycle
Link copied to clipboard
open fun getLoaderManager(): LoaderManager
Link copied to clipboard
fun getParentFragment(): Fragment?
Link copied to clipboard
fun getParentFragmentManager(): FragmentManager
Link copied to clipboard
open fun getReenterTransition(): Any?
Link copied to clipboard
fun getResources(): Resources
Link copied to clipboard
fun getRetainInstance(): Boolean
Link copied to clipboard
open fun getReturnTransition(): Any?
Link copied to clipboard
override fun getSavedStateRegistry(): SavedStateRegistry
Link copied to clipboard
open fun getSharedElementEnterTransition(): Any?
Link copied to clipboard
open fun getSharedElementReturnTransition(): Any?
Link copied to clipboard
open fun getShowsDialog(): Boolean
Link copied to clipboard
fun getString(@StringRes p0: Int): String
fun getString(@StringRes p0: Int, @Nullable vararg p1: Any): String
Link copied to clipboard
fun getTag(): String?
Link copied to clipboard
fun getTargetFragment(): Fragment?
Link copied to clipboard
fun getTargetRequestCode(): Int
Link copied to clipboard
fun getText(@StringRes p0: Int): CharSequence
Link copied to clipboard
open override fun getTheme(): Int

Override theme to allow auto switch between day & night design.

Link copied to clipboard
fun getTopStyle(): TopStyle
Link copied to clipboard
open fun getUserVisibleHint(): Boolean
Link copied to clipboard
open fun getView(): View?
Link copied to clipboard
open fun getViewLifecycleOwner(): LifecycleOwner
Link copied to clipboard
open fun getViewLifecycleOwnerLiveData(): LiveData<LifecycleOwner>
Link copied to clipboard
open override fun getViewModelStore(): ViewModelStore
Link copied to clipboard
override fun hashCode(): Int
Link copied to clipboard
fun hasOptionsMenu(): Boolean
Link copied to clipboard
fun isAdded(): Boolean
Link copied to clipboard
open fun isCancelable(): Boolean
Link copied to clipboard
fun isDetached(): Boolean
Link copied to clipboard
fun isHidden(): Boolean
Link copied to clipboard
fun isInLayout(): Boolean
Link copied to clipboard
fun isMenuVisible(): Boolean
Link copied to clipboard
fun isRemoving(): Boolean
Link copied to clipboard
fun isResumed(): Boolean
Link copied to clipboard
fun isStateSaved(): Boolean
Link copied to clipboard
fun isVisible(): Boolean
Link copied to clipboard
fun navigationBarColor(@ColorInt color: Int)

Set the color of the navigation bar.

Link copied to clipboard
fun navigationBarColorRes(@ColorRes colorRes: Int)

Set the color of the navigation bar.

Link copied to clipboard
fun negativeButtonColor(@ColorInt negativeButtonColor: Int)

Set the negative button color.

Link copied to clipboard
fun negativeButtonColorRes(@ColorRes negativeButtonColor: Int)

Set the negative button color.

Link copied to clipboard
fun negativeButtonStyle(negativeButtonStyle: ButtonStyle)

Set the negative button style.

Link copied to clipboard
open fun onActivityCreated(@Nullable p0: Bundle?)
Link copied to clipboard
open fun onActivityResult(    p0: Int,     p1: Int,     @Nullable p2: Intent?)
Link copied to clipboard
open override fun onAttach(@NonNull p0: Context)
open fun onAttach(@NonNull p0: Activity)
Link copied to clipboard
open fun onAttachFragment(@NonNull p0: Fragment)
Link copied to clipboard
open override fun onCancel(dialog: DialogInterface)

fun onCancel(cancelListener: CancelListener)

Set a listener that is invoked when the sheet is cancelled.

Link copied to clipboard
fun onClose(closeListener: CloseListener)

Set a listener that is invoked when the sheet is closed.

Link copied to clipboard
open override fun onConfigurationChanged(@NonNull p0: Configuration)
Link copied to clipboard
open fun onContextItemSelected(@NonNull p0: MenuItem): Boolean
Link copied to clipboard
open override fun onCreate(@Nullable p0: Bundle?)
Link copied to clipboard
open fun onCreateAnimation(    p0: Int,     p1: Boolean,     p2: Int): Animation?
Link copied to clipboard
open fun onCreateAnimator(    p0: Int,     p1: Boolean,     p2: Int): Animator?
Link copied to clipboard
open override fun onCreateContextMenu(    @NonNull p0: ContextMenu,     @NonNull p1: View,     @Nullable p2: ContextMenu.ContextMenuInfo?)
Link copied to clipboard
open override fun onCreateDialog(savedInstanceState: Bundle?): Dialog
Link copied to clipboard
abstract fun onCreateLayoutView(): View

Create custom view to be added to the base sheet.

Link copied to clipboard
open fun onCreateOptionsMenu(@NonNull p0: Menu, @NonNull p1: MenuInflater)
Link copied to clipboard
open override fun onCreateView(    inflater: LayoutInflater,     container: ViewGroup?,     saved: Bundle?): View?

Create view of base sheet.

Link copied to clipboard
open fun onDestroy()
Link copied to clipboard
open fun onDestroyOptionsMenu()
Link copied to clipboard
open override fun onDestroyView()
Link copied to clipboard
open override fun onDetach()
Link copied to clipboard
open override fun onDismiss(@NonNull p0: DialogInterface)

fun onDismiss(dismissListener: DismissListener)

Set a listener that is invoked when the sheet is dismissed (after negative or positive button click).

Link copied to clipboard
open override fun onGetLayoutInflater(@Nullable p0: Bundle?): LayoutInflater
Link copied to clipboard
open fun onHiddenChanged(p0: Boolean)
Link copied to clipboard
open fun onInflate(    @NonNull p0: Activity,     @NonNull p1: AttributeSet,     @Nullable p2: Bundle?)
open fun onInflate(    @NonNull p0: Context,     @NonNull p1: AttributeSet,     @Nullable p2: Bundle?)
Link copied to clipboard
open override fun onLowMemory()
Link copied to clipboard
open fun onMultiWindowModeChanged(p0: Boolean)
Link copied to clipboard
fun onNegative(negativeListener: NegativeListener)

Set a listener.

fun onNegative(@StringRes negativeRes: Int, negativeListener: NegativeListener? = null)
fun onNegative(negativeText: String, negativeListener: NegativeListener? = null)

Set the text of the negative button and optionally a listener.

fun onNegative(    @StringRes negativeRes: Int,     @DrawableRes drawableRes: Int,     negativeListener: NegativeListener? = null)
fun onNegative(    negativeText: String,     @DrawableRes drawableRes: Int,     negativeListener: NegativeListener? = null)

Set the text and drawable of the negative button and optionally a listener.

Link copied to clipboard
open fun onOptionsItemSelected(@NonNull p0: MenuItem): Boolean
Link copied to clipboard
open fun onOptionsMenuClosed(@NonNull p0: Menu)
Link copied to clipboard
open fun onPause()
Link copied to clipboard
open fun onPictureInPictureModeChanged(p0: Boolean)
Link copied to clipboard
open fun onPrepareOptionsMenu(@NonNull p0: Menu)
Link copied to clipboard
open fun onPrimaryNavigationFragmentChanged(p0: Boolean)
Link copied to clipboard
open fun onRequestPermissionsResult(    p0: Int,     @NonNull p1: Array<String>,     @NonNull p2: IntArray)
Link copied to clipboard
open override fun onResume()
Link copied to clipboard
open override fun onSaveInstanceState(@NonNull p0: Bundle)
Link copied to clipboard
open override fun onStart()
Link copied to clipboard
open override fun onStop()
Link copied to clipboard
open override fun onViewCreated(view: View, savedInstanceState: Bundle?)
Link copied to clipboard
open override fun onViewStateRestored(@Nullable p0: Bundle?)
Link copied to clipboard
fun peekHeight(peekHeight: Int)

Set the peek height.

Link copied to clipboard
fun positiveButtonColor(@ColorInt positiveButtonColor: Int)

Set the positive button color.

Link copied to clipboard
fun positiveButtonColorRes(@ColorRes positiveButtonColor: Int)

Set the positive button color.

Link copied to clipboard
fun positiveButtonStyle(positiveButtonStyle: ButtonStyle)

Set the positive button style.

Link copied to clipboard
open fun postponeEnterTransition()
fun postponeEnterTransition(p0: Long, @NonNull p1: TimeUnit)
Link copied to clipboard
Link copied to clipboard
open fun registerForContextMenu(@NonNull p0: View)
Link copied to clipboard
fun removeAddOnComponent(addOnComponent: AddOnComponent)
Link copied to clipboard
fun removeOnCreateViewListener(onCreateViewListener: OnViewCreatedListener)
Link copied to clipboard
fun requestPermissions(@NonNull p0: Array<String>, p1: Int)
Link copied to clipboard
fun requireActivity(): FragmentActivity
Link copied to clipboard
fun requireArguments(): Bundle
Link copied to clipboard
fun requireContext(): Context
Link copied to clipboard
fun requireDialog(): Dialog
Link copied to clipboard
fun requireFragmentManager(): FragmentManager
Link copied to clipboard
fun requireHost(): Any
Link copied to clipboard
fun requireParentFragment(): Fragment
Link copied to clipboard
fun requireView(): View
Link copied to clipboard
open fun setAllowEnterTransitionOverlap(p0: Boolean)
Link copied to clipboard
open fun setAllowReturnTransitionOverlap(p0: Boolean)
Link copied to clipboard
open fun setArguments(@Nullable p0: Bundle?)
Link copied to clipboard
open fun setCancelable(p0: Boolean)
Link copied to clipboard
fun setCoverAnimationView(coverAnimationView: Any)
Link copied to clipboard
open fun setEnterSharedElementCallback(@Nullable p0: SharedElementCallback?)
Link copied to clipboard
open fun setEnterTransition(@Nullable p0: Any?)
Link copied to clipboard
open fun setExitSharedElementCallback(@Nullable p0: SharedElementCallback?)
Link copied to clipboard
open fun setExitTransition(@Nullable p0: Any?)
Link copied to clipboard
open fun setHasOptionsMenu(p0: Boolean)
Link copied to clipboard
open fun setInitialSavedState(@Nullable p0: Fragment.SavedState?)
Link copied to clipboard
open fun setMenuVisibility(p0: Boolean)
Link copied to clipboard
open fun setReenterTransition(@Nullable p0: Any?)
Link copied to clipboard
open fun setRetainInstance(p0: Boolean)
Link copied to clipboard
open fun setReturnTransition(@Nullable p0: Any?)
Link copied to clipboard
open fun setSharedElementEnterTransition(@Nullable p0: Any?)
Link copied to clipboard
open fun setSharedElementReturnTransition(@Nullable p0: Any?)
Link copied to clipboard
open fun setShowsDialog(p0: Boolean)
Link copied to clipboard
open override fun setStyle(style: Int, theme: Int)

Override style to switch between sheet & dialog style.

Link copied to clipboard
open fun setTargetFragment(@Nullable p0: Fragment?, p1: Int)
Link copied to clipboard
fun setupCoverSource(imageSource: ImageSource, imageView: AppCompatImageView)

Setup an image source for the cover view.

Link copied to clipboard
open override fun setupDialog(dialog: Dialog, style: Int)
Link copied to clipboard
open fun setUserVisibleHint(p0: Boolean)
Link copied to clipboard
open fun shouldShowRequestPermissionRationale(@NonNull p0: String): Boolean
Link copied to clipboard
fun show()

Show the sheet.

open fun show(@NonNull p0: FragmentManager, @Nullable p1: String?)
open fun show(@NonNull p0: FragmentTransaction, @Nullable p1: String?): Int
Link copied to clipboard
open fun showNow(@NonNull p0: FragmentManager, @Nullable p1: String?)
Link copied to clipboard
open fun startActivity(p0: Intent)
open fun startActivity(p0: Intent, @Nullable p1: Bundle?)
Link copied to clipboard
open fun startActivityForResult(p0: Intent, p1: Int)
open fun startActivityForResult(    p0: Intent,     p1: Int,     @Nullable p2: Bundle?)
Link copied to clipboard
open fun startIntentSenderForResult(    p0: IntentSender,     p1: Int,     @Nullable p2: Intent?,     p3: Int,     p4: Int,     p5: Int,     @Nullable p6: Bundle?)
Link copied to clipboard
open fun startPostponedEnterTransition()
Link copied to clipboard
fun style(style: SheetStyle)

Set sheet style.

Link copied to clipboard
fun title(@StringRes titleRes: Int)
fun title(title: String)
fun title(@StringRes titleRes: Int, vararg formatArgs: Any?)

Set the title of the sheet.

Link copied to clipboard
fun titleColor(@ColorInt titleColor: Int)

Set the title color of the sheet.

Link copied to clipboard
fun titleColorRes(@ColorRes titleColorRes: Int)

Set the title color of the sheet.

Link copied to clipboard
fun topStyle(topStyle: TopStyle)

Set the top style.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open fun unregisterForContextMenu(@NonNull p0: View)
Link copied to clipboard
fun useCover(useCover: Boolean = true)
Link copied to clipboard
fun withCoverImage(image: Image)

Set a cover image.

Link copied to clipboard
fun withIconButton(iconButton: IconButton, listener: ClickListener? = null)

Add an icon button to the sheet toolbar to the right of the title. The icon buttons will be aligned from the right in the order you call this method. You can only add up to 3 icon buttons.

Properties

Link copied to clipboard
open override val dialogTag: String
Link copied to clipboard
open lateinit var windowContext: Context