Java ProcessViewer类代码示例(javaprocessviewer类的典型用法代码示例)

本文整理汇总了Java中com.amaze.filemanager.fragments.ProcessViewer的典型用法代码示例。如果您正苦于以下问题:Java ProcessViewer类的具体用法?Java ProcessViewer怎么用?Java ProcessViewer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Java ProcessViewer类代码示例(javaprocessviewer类的典型用法代码示例)

ProcessViewer类属于com.amaze.filemanager.fragments包,在下文中一共展示了ProcessViewer类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onNewIntent

import com.amaze.filemanager.fragments.ProcessViewer; //导入依赖的package包/类
@Override
public void onNewIntent(Intent i) {
    intent = i;
    path = i.getStringExtra("path");

    if (path != null) {
        if (new File(path).isDirectory()) {
            MainFragment ma = getCurrentMainFragment();
            if (ma != null) {
                ma.loadlist(path, false, OpenMode.FILE);
            } else goToMain(path);
        } else utils.openFile(new File(path), mainActivity);
    } else if (i.getStringArrayListExtra(TAG_INTENT_FILTER_FAILED_OPS) != null) {
        ArrayList<BaseFile> failedOps = i.getParcelableArrayListExtra(TAG_INTENT_FILTER_FAILED_OPS);
        if (failedOps != null) {
            mainActivityHelper.showFailedOperationDialog(failedOps, i.getBooleanExtra("move", false), this);
        }
    } else if (i.getCategories() != null && i.getCategories().contains(CLOUD_AUTHENTICATOR_GDRIVE)) {

        // we used an external authenticator instead of APIs. Probably for Google Drive
        CloudRail.setAuthenticationResponse(intent);

    } else if ((openProcesses = i.getBooleanExtra(KEY_INTENT_PROCESS_VIEWER, false))) {
        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
        transaction.replace(R.id.content_frame, new ProcessViewer(), KEY_INTENT_PROCESS_VIEWER);
        //   transaction.addToBackStack(null);
        selectedStorage = SELECT_102;
        openProcesses = false;
        //title.setText(utils.getString(con, R.string.process_viewer));
        //Commit the transaction
        transaction.commitAllowingStateLoss();
        supportInvalidateOptionsMenu();
    } else if (intent.getAction() != null) {
        if (intent.getAction().equals(Intent.ACTION_GET_CONTENT)) {
            // file picker intent
            mReturnIntent = true;
            Toast.makeText(this, getString(R.string.pick_a_file), Toast.LENGTH_LONG).show();
        } else if (intent.getAction().equals(RingtoneManager.ACTION_RINGTONE_PICKER)) {
            // ringtone picker intent
            mReturnIntent = true;
            mRingtonePickerIntent = true;
            Toast.makeText(this, getString(R.string.pick_a_file), Toast.LENGTH_LONG).show();
        } else if (intent.getAction().equals(Intent.ACTION_VIEW)) {
            // zip viewer intent
            Uri uri = intent.getData();
            zippath = uri.toString();
            openZip(zippath);
        }

        if (SDK_INT >= Build.VERSION_CODES.KITKAT) {
            if (intent.getAction().equals(UsbManager.ACTION_USB_DEVICE_ATTACHED)) {
                if (sharedPref.getString(KEY_PREF_OTG, null) == null) {
                    sharedPref.edit().putString(KEY_PREF_OTG, VALUE_PREF_OTG_NULL).apply();
                    refreshDrawer();
                }
            } else if (intent.getAction().equals(UsbManager.ACTION_USB_DEVICE_DETACHED)) {
                sharedPref.edit().putString(KEY_PREF_OTG, null).apply();
                refreshDrawer();
            }
        }
    }
} 
开发者ID:TeamAmaze,项目名称:AmazeFileManager,代码行数:63,代码来源:MainActivity.java

本文标签属性:

示例:示例英文

代码:代码零九

java:java面试题

ProcessViewer:ProcessViewer

上一篇:PHP RSSFeed::returnItems方法代码示例(phprssfeed::returnitems方法的典型用法代码示例)
下一篇:朴灿烈是财阀吗(EXO朴灿烈的外号有什么)

为您推荐