Example usage for android.app DialogFragment getTheme

List of usage examples for android.app DialogFragment getTheme

Introduction

In this page you can find the example usage for android.app DialogFragment getTheme.

Prototype

public int getTheme() 

Source Link

Usage

From source file:com.mediatek.galleryfeature.stereo.fancycolor.FancyColorActivity.java

private void showLoadingProgress() {
    MtkLog.d(TAG, "<showLoadingProgress>");
    DialogFragment fragment;/*  w w  w.  j  a v a 2  s.  c  o  m*/
    if (mLoadingProgressDialog != null) {
        fragment = mLoadingProgressDialog.get();
        if (fragment != null) {
            if (!fragment.isAdded()) {
                fragment.show(getFragmentManager(), null);
            }
            return;
        }
    }

    final DialogFragment genProgressDialog = new ProgressFragment(" ");
    genProgressDialog.setCancelable(false);
    genProgressDialog.show(getFragmentManager(), null);
    genProgressDialog.setStyle(R.style.RefocusDialog, genProgressDialog.getTheme());
    mLoadingProgressDialog = new WeakReference<DialogFragment>(genProgressDialog);
}

From source file:com.mediatek.galleryfeature.stereo.fancycolor.FancyColorActivity.java

private void showSavingProgress(String albumName) {
    DialogFragment fragment;//from   w ww  .j a v  a2 s  .  c o  m

    if (mSavingProgressDialog != null) {
        fragment = mSavingProgressDialog.get();
        if (fragment != null) {
            if (!fragment.isAdded()) {
                fragment.show(getFragmentManager(), null);
            }
            return;
        }
    }
    String progressText;
    if (albumName == null) {
        progressText = getString(R.string.saving_image);
    } else {
        progressText = getString(R.string.m_refocus_saving_image, albumName);
    }
    final DialogFragment genProgressDialog = new ProgressFragment(progressText);
    genProgressDialog.setCancelable(false);
    genProgressDialog.show(getFragmentManager(), null);
    genProgressDialog.setStyle(R.style.RefocusDialog, genProgressDialog.getTheme());
    mSavingProgressDialog = new WeakReference<DialogFragment>(genProgressDialog);
}