當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。