android.support.design.widget.BottomSheetDialogFragment Java Examples

The following examples show how to use android.support.design.widget.BottomSheetDialogFragment. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainActivityHelper.java    From PowerFileExplorer with GNU General Public License v3.0 6 votes vote down vote up
public void add(int pos) {
    final ContentFragment ma = mainActivity.slideFrag1Selected ? mainActivity.curContentFrag : mainActivity.curExplorerFrag;//(MainFragment) ((TabFragment) mainActivity.getSupportFragmentManager().findFragmentById(R.id.content_frame)).getCurrentTabFragment();
    final String path = ma.currentPathTitle;

    switch (pos) {
        case NEW_FOLDER:
            mkdir(ma.openMode, path, ma);
            break;
        case NEW_FILE:
            mkfile(ma.openMode, path, ma);
            break;
        case NEW_CLOUD:
            BottomSheetDialogFragment fragment = new CloudSheetFragment();
            fragment.show(ma.getActivity().getSupportFragmentManager(),
			  CloudSheetFragment.TAG_FRAGMENT);
            break;
    }
}
 
Example #2
Source File: MainActivity.java    From AndroidDemoProjects with Apache License 2.0 6 votes vote down vote up
@Override
public void onClick(View v) {
    switch( v.getId() ) {
        case R.id.button_1: {
            mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
            break;
        }
        case R.id.button_2: {
            mBottomSheetBehavior.setPeekHeight(300);
            mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
            break;
        }
        case R.id.button_3: {
            BottomSheetDialogFragment bottomSheetDialogFragment = new TutsPlusBottomSheetDialogFragment();
            bottomSheetDialogFragment.show(getSupportFragmentManager(), bottomSheetDialogFragment.getTag());
            break;
        }
    }
}
 
Example #3
Source File: FeedbackBottomSheet.java    From graphhopper-navigation-android with MIT License 4 votes vote down vote up
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setStyle(BottomSheetDialogFragment.STYLE_NO_FRAME, R.style.Theme_Design_BottomSheetDialog);
}