Search in sources :

Example 1 with SmbSearchDialog

use of com.amaze.filemanager.ui.dialogs.SmbSearchDialog in project AmazeFileManager by TeamAmaze.

the class CloudSheetFragment method onClick.

@Override
public void onClick(View v) {
    Log.d(TAG_FRAGMENT, "Clicked: " + v.getId());
    switch(v.getId()) {
        case R.id.linear_layout_smb:
            dismiss();
            SmbSearchDialog smbDialog = new SmbSearchDialog();
            smbDialog.show(getActivity().getFragmentManager(), "tab");
            return;
        case R.id.linear_layout_scp:
            dismiss();
            SftpConnectDialog sftpConnectDialog = new SftpConnectDialog();
            Bundle args = new Bundle();
            args.putBoolean("edit", false);
            sftpConnectDialog.setArguments(args);
            sftpConnectDialog.show(getActivity().getFragmentManager(), "tab");
            return;
        case R.id.linear_layout_box:
            ((MainActivity) getActivity()).addConnection(OpenMode.BOX);
            break;
        case R.id.linear_layout_dropbox:
            ((MainActivity) getActivity()).addConnection(OpenMode.DROPBOX);
            break;
        case R.id.linear_layout_google_drive:
            ((MainActivity) getActivity()).addConnection(OpenMode.GDRIVE);
            break;
        case R.id.linear_layout_onedrive:
            ((MainActivity) getActivity()).addConnection(OpenMode.ONEDRIVE);
            break;
        case R.id.linear_layout_get_cloud:
            Intent cloudPluginIntent = new Intent(Intent.ACTION_VIEW);
            cloudPluginIntent.setData(Uri.parse("market://details?id=com.filemanager.amazecloud"));
            startActivity(cloudPluginIntent);
            break;
    }
    // dismiss this sheet dialog
    dismiss();
}
Also used : SftpConnectDialog(com.amaze.filemanager.ui.dialogs.SftpConnectDialog) Bundle(android.os.Bundle) Intent(android.content.Intent) MainActivity(com.amaze.filemanager.activities.MainActivity) SmbSearchDialog(com.amaze.filemanager.ui.dialogs.SmbSearchDialog)

Aggregations

Intent (android.content.Intent)1 Bundle (android.os.Bundle)1 MainActivity (com.amaze.filemanager.activities.MainActivity)1 SftpConnectDialog (com.amaze.filemanager.ui.dialogs.SftpConnectDialog)1 SmbSearchDialog (com.amaze.filemanager.ui.dialogs.SmbSearchDialog)1