Example usage for android.app DialogFragment STYLE_NO_TITLE

List of usage examples for android.app DialogFragment STYLE_NO_TITLE

Introduction

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

Prototype

int STYLE_NO_TITLE

To view the source code for android.app DialogFragment STYLE_NO_TITLE.

Click Source Link

Document

Style for #setStyle(int,int) : don't include a title area.

Usage

From source file:ab.util.AbDialogUtil.java

/**
 * ??.//w  w w  .j  a v a2  s .  com
 * 
 * @param context
 * @param indeterminateDrawable
 * @param message
 * @param
 * @return
 */
public static AbRefreshDialogFragment showRefreshPanel(Context context, int indeterminateDrawable,
        String message, AbDialogOnLoadListener abDialogOnLoadListener) {
    FragmentActivity activity = (FragmentActivity) context;
    AbRefreshDialogFragment newFragment = AbRefreshDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE,
            android.R.style.Theme_Light_Panel);
    newFragment.setIndeterminateDrawable(indeterminateDrawable);
    newFragment.setMessage(message);
    newFragment.setAbDialogOnLoadListener(abDialogOnLoadListener);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, mDialogTag);
    return newFragment;
}

From source file:com.segma.trim.MainActivity.java

private void showSaveLocation() {
    if (true || dirChooser == null) {
        dirChooser = DirectoryChooserFragment
                .newInstance(/*  w w  w .  j ava 2s  . c  o  m*/
                        DirectoryChooserConfig.builder().initialDirectory(PREF_SAVE_LOCATION_VALUE)
                                .allowReadOnlyDirectory(false).allowNewDirectoryNameModification(true)
                                .newDirectoryName(getApplicationContext()
                                        .getString(getApplicationContext().getApplicationInfo().labelRes))
                                .build());

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            dirChooser.setStyle(DialogFragment.STYLE_NO_TITLE, R.style.AppTheme_DialogTheme_API21);
        } else {
            dirChooser.setStyle(DialogFragment.STYLE_NO_TITLE, R.style.AppTheme_DialogTheme);
        }
        //dirChooser.setStyle(DialogFragment.STYLE_NO_TITLE, R.style.AppTheme_DialogTheme);
    }
    dirChooser.show(getFragmentManager(), null);
}