当前位置: 首页>>代码示例>>Java>>正文


Java DialogFragment.dismiss方法代码示例

本文整理汇总了Java中android.app.DialogFragment.dismiss方法的典型用法代码示例。如果您正苦于以下问题:Java DialogFragment.dismiss方法的具体用法?Java DialogFragment.dismiss怎么用?Java DialogFragment.dismiss使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.app.DialogFragment的用法示例。


在下文中一共展示了DialogFragment.dismiss方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: removeDialog

import android.app.DialogFragment; //导入方法依赖的package包/类
private void removeDialog(int dialogId) {
    FragmentManager fm = getFragmentManager();

    if (fm == null || isRemoving() || isDetached()) {
        return;
    }

    // Make sure the "show dialog" transaction has been processed when we call
    // findFragmentByTag() below. Otherwise the fragment won't be found and the dialog will
    // never be dismissed.
    fm.executePendingTransactions();

    DialogFragment fragment = (DialogFragment) fm.findFragmentByTag(getDialogTag(dialogId));

    if (fragment != null) {
        fragment.dismiss();
    }
}
 
开发者ID:philipwhiuk,项目名称:q-mail,代码行数:19,代码来源:MessageViewFragment.java

示例2: closeDialogIfOpen

import android.app.DialogFragment; //导入方法依赖的package包/类
private void closeDialogIfOpen(String tag) {
    FragmentManager manager = getFragmentManager();
    if (manager == null) {
        // Do nothing if the manager doesn't exist yet; see http://crbug.com/480544.
        return;
    }
    DialogFragment df = (DialogFragment) manager.findFragmentByTag(tag);
    if (df != null) {
        df.dismiss();
    }
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:12,代码来源:SyncCustomizationFragment.java

示例3: hideDonateDialog

import android.app.DialogFragment; //导入方法依赖的package包/类
void hideDonateDialog() {
    DialogFragment fragment = (DialogFragment) getFragmentManager()
            .findFragmentByTag(FRAGMENT_DONATION_PROGRESS);
    if (fragment != null && !isStopped()) {
        fragment.dismiss();
    }
}
 
开发者ID:brevent,项目名称:Brevent,代码行数:8,代码来源:DonateActivity.java

示例4: dismissDialog

import android.app.DialogFragment; //导入方法依赖的package包/类
private void dismissDialog(String tag, boolean allowStateLoss) {
    DialogFragment fragment = (DialogFragment) getFragmentManager().findFragmentByTag(tag);
    if (fragment != null) {
        if (Log.isLoggable(UILog.TAG, Log.DEBUG)) {
            UILog.d("dismiss " + tag + ", " + allowStateLoss + ": " + allowStateLoss
                    + ", stopped: " + isStopped());
        }
        if (allowStateLoss) {
            fragment.dismissAllowingStateLoss();
        } else if (!isStopped()) {
            fragment.dismiss();
        }
    }
}
 
开发者ID:brevent,项目名称:Brevent,代码行数:15,代码来源:BreventActivity.java

示例5: onEventMainThread

import android.app.DialogFragment; //导入方法依赖的package包/类
public void onEventMainThread(ThrowableFailureEvent event) {
    if (ErrorDialogManager.isInExecutionScope(this.executionScope, event)) {
        ErrorDialogManager.checkLogException(event);
        FragmentManager fm = getFragmentManager();
        fm.executePendingTransactions();
        DialogFragment existingFragment = (DialogFragment) fm.findFragmentByTag(ErrorDialogManager.TAG_ERROR_DIALOG);
        if (existingFragment != null) {
            existingFragment.dismiss();
        }
        DialogFragment errorFragment = (DialogFragment) ErrorDialogManager.factory.prepareErrorFragment(event, this.finishAfterDialog, this.argumentsForErrorDialog);
        if (errorFragment != null) {
            errorFragment.show(fm, ErrorDialogManager.TAG_ERROR_DIALOG);
        }
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:16,代码来源:ErrorDialogManager.java

示例6: dismissDialog

import android.app.DialogFragment; //导入方法依赖的package包/类
private void dismissDialog(String tag) {
    DialogFragment fragment = (DialogFragment) getFragmentManager().findFragmentByTag(tag);
    if (fragment != null && !isStopped()) {
        fragment.dismiss();
    }
}
 
开发者ID:brevent,项目名称:Brevent,代码行数:7,代码来源:BreventOps.java

示例7: dismissProgress

import android.app.DialogFragment; //导入方法依赖的package包/类
public static void dismissProgress(final FragmentManager fm) {
    final DialogFragment fragment = (DialogFragment) fm.findFragmentByTag(FRAGMENT_TAG);
    fragment.dismiss();
}
 
开发者ID:guodroid,项目名称:okwallet,代码行数:5,代码来源:ProgressDialogFragment.java


注:本文中的android.app.DialogFragment.dismiss方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。