Search in sources :

Example 1 with CloudSheetFragment

use of com.amaze.filemanager.fragments.CloudSheetFragment in project AmazeFileManager by TeamAmaze.

the class MainActivityHelper method add.

public void add(int pos) {
    final MainFragment ma = (MainFragment) ((TabFragment) mainActivity.getSupportFragmentManager().findFragmentById(R.id.content_frame)).getCurrentTabFragment();
    final String path = ma.getCurrentPath();
    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;
    }
}
Also used : BottomSheetDialogFragment(android.support.design.widget.BottomSheetDialogFragment) CloudSheetFragment(com.amaze.filemanager.fragments.CloudSheetFragment) MainFragment(com.amaze.filemanager.fragments.MainFragment)

Aggregations

BottomSheetDialogFragment (android.support.design.widget.BottomSheetDialogFragment)1 CloudSheetFragment (com.amaze.filemanager.fragments.CloudSheetFragment)1 MainFragment (com.amaze.filemanager.fragments.MainFragment)1