Example usage for android.app DialogFragment setStyle

List of usage examples for android.app DialogFragment setStyle

Introduction

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

Prototype

public void setStyle(int style, int theme) 

Source Link

Document

Call to customize the basic appearance and behavior of the fragment's dialog.

Usage

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

private void showLoadingProgress() {
    MtkLog.d(TAG, "<showLoadingProgress>");
    DialogFragment fragment;/*from w  ww.  ja v  a  2s. 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;/*ww  w  . j a  va2  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);
}