Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

BottomSheet

michal3377 edited this page Aug 11, 2016 · 3 revisions

BottomSheetDialog

BottomSheetDialog is a custom full screen Dialog that slide in from bottom.

Usage

Initialize in code:

    BottomSheetDialog mDialog = new BottomSheetDialog(context);

    BottomSheetDialog mDialog = new BottomSheetDialog(context, styleId);

You can chain methods to style BottomSheetDialog:

    mDialog.applyStyle(styleId)
        .contentView(view)
        .heightParam(ViewGroup.LayoutParams.WRAP_CONTENT)
        .inDuration(500)
        .cancelable(true)
        ...
        .show();

Attributes

  • bsd_inDuration - The duration of animation when dialog slide in.

  • bsd_inInterpolator - The interpolator of animation when dialog slide in.

  • bsd_outDuration - The duration of animation when dialog slide out.

  • bsd_outInterpolator - The interpolator of animation when dialog slide out.

  • bsd_cancelable - Indicate that dialog is cancelable.

  • bsd_canceledOnTouchOutside - Indicate that dialog will be canceled when touch outside.

  • bsd_dimAmount - The amount of dim applied to background outside dialog.

  • android:layout_height - The height of dialog's layout params. Can be dimension value or match_parent or wrap_content enum.

Clone this wiki locally