Android Bottom Sheets edit

Modal bottom sheets with BottomSheetDialogFragment

You can realize a modal bottom sheets using a BottomSheetDialogFragment.

The BottomSheetDialogFragment is a modal bottom sheet.

This is a version of DialogFragment that shows a bottom sheet using BottomSheetDialog instead of a floating dialog.

Just define the fragment:

public class MyBottomSheetDialogFragment extends BottomSheetDialogFragment {

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        return inflater.inflate(R.layout.my_fragment_bottom_sheet, container);
    }
}

Then use this code to show the fragment:

MyBottomSheetDialogFragment mySheetDialog = new MyBottomSheetDialogFragment();
FragmentManager fm = getSupportFragmentManager();
mySheetDialog.show(fm, "modalSheetDialog");

This Fragment will create a BottomSheetDialog.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Table Of Contents
39 ACRA
64 Menu
112 Loader
119 Xposed
132 Colors
135 Fresco
140 AdMob
147 Button
149 Bottom Sheets
156 Vk SDK
170 XMPP
176 OpenCV
200 FileIO
203 Moshi
217 Paint
231 AIDL
241 JCodec
243 Okio
255 Looper
  ↑ ↓ to navigate     ↵ to select     Esc to close