Search in sources :

Example 1 with BottomSheetDialog

use of com.rey.material.app.BottomSheetDialog in project material by rey5137.

the class DialogsFragment method showBottomSheet.

private void showBottomSheet() {
    mBottomSheetDialog = new BottomSheetDialog(mActivity, R.style.Material_App_BottomSheetDialog);
    View v = LayoutInflater.from(mActivity).inflate(R.layout.view_bottomsheet, null);
    ViewUtil.setBackground(v, new ThemeDrawable(R.array.bg_window));
    Button bt_match = (Button) v.findViewById(R.id.sheet_bt_match);
    bt_match.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            mBottomSheetDialog.heightParam(ViewGroup.LayoutParams.MATCH_PARENT);
        }
    });
    Button bt_wrap = (Button) v.findViewById(R.id.sheet_bt_wrap);
    bt_wrap.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            mBottomSheetDialog.heightParam(ViewGroup.LayoutParams.WRAP_CONTENT);
        }
    });
    mBottomSheetDialog.contentView(v).show();
}
Also used : BottomSheetDialog(com.rey.material.app.BottomSheetDialog) Button(com.rey.material.widget.Button) ThemeDrawable(com.rey.material.drawable.ThemeDrawable) View(android.view.View)

Aggregations

View (android.view.View)1 BottomSheetDialog (com.rey.material.app.BottomSheetDialog)1 ThemeDrawable (com.rey.material.drawable.ThemeDrawable)1 Button (com.rey.material.widget.Button)1