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:com.ab.util.AbDialogUtil.java

/**
 * ?????View/* w  w w.j  a v a2  s.  co  m*/
 * @param view
 * @return
 */
public static AbSampleDialogFragment showTipsDialog(View view) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    // Create and show the dialog.
    AbSampleDialogFragment newFragment = AbSampleDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE,
            android.R.style.Theme_Holo_Light);
    newFragment.setContentView(view);

    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    //    
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    // ?,content?fragment,Activity  
    ft.add(android.R.id.content, newFragment, mDialogTag).addToBackStack(null).commit();

    return newFragment;
}

From source file:at.bitfire.davdroid.ui.setup.QueryServerDialogFragment.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setStyle(DialogFragment.STYLE_NO_TITLE, android.R.style.Theme_Holo_Light_Dialog);
    setCancelable(false);/* ww  w.j a  v  a2  s  .  c o m*/

    Loader<ServerInfo> loader = getLoaderManager().initLoader(0, getArguments(), this);
    if (savedInstanceState == null) // http://code.google.com/p/android/issues/detail?id=14944
        loader.forceLoad();
}

From source file:com.amazon.android.ui.fragments.ErrorDialogFragment.java

/**
 * Creates a new instance of the dialog fragment.
 *
 * @param context                     The relevant context.
 * @param errorCategory               To help determine the error specific parameters.
 * @param errorDialogFragmentListener The fragment listener.
 * @return The ErrorDialogFragment instance.
 *//*from   w  ww  .  java 2s.co m*/
public static ErrorDialogFragment newInstance(Context context, ErrorUtils.ERROR_CATEGORY errorCategory,
        ErrorDialogFragmentListener errorDialogFragmentListener) {

    ErrorDialogFragment errorDialogFragment = new ErrorDialogFragment();
    errorDialogFragment.mListener = errorDialogFragmentListener;
    errorDialogFragment.setStyle(DialogFragment.STYLE_NO_TITLE, R.style.error_dialog);
    // Setting it as non-cancelable prevents back button press issues.
    errorDialogFragment.setCancelable(false);
    Bundle args = new Bundle();
    // Set the error category.
    args.putSerializable(ARG_ERROR_CATEGORY, errorCategory);
    // Get the error message.
    args.putString(ARG_ERROR_MESSAGE, ErrorUtils.getErrorMessage(context, errorCategory));
    // Get the button details.
    args.putStringArrayList(ARG_ACTION_LABELS,
            (ArrayList<String>) ErrorUtils.getButtonLabelsList(context, errorCategory));
    // Get the button behavior.
    errorDialogFragment.setArguments(args);
    return errorDialogFragment;
}

From source file:com.bangqu.eshow.util.ESDialogUtil.java

/**
 * /*  w  w w .ja va  2  s  .  c  om*/
 * ???.
 * @param view
 * @param gravity ?
 * @param style
 * @return
 */
public static ESSampleDialogFragment showDialog(View view, int gravity, int style) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    // Create and show the dialog.
    ESSampleDialogFragment newFragment = ESSampleDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE,
            style, gravity);
    newFragment.setContentView(view);

    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    //    
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, dialogTag);

    return newFragment;
}

From source file:ab.util.AbDialogUtil.java

/**
 * ?????View/*from w w w.  jav a2s  . co  m*/
 * 
 * @param view
 * @return
 */
public static AbSampleDialogFragment showTipsDialog(View view) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    // Create and show the dialog.
    AbSampleDialogFragment newFragment = AbSampleDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE,
            android.R.style.Theme_Holo_Light);
    newFragment.setContentView(view);

    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    // ?,content?fragment,Activity
    ft.add(android.R.id.content, newFragment, mDialogTag).addToBackStack(null).commit();

    return newFragment;
}

From source file:cn.org.eshow.framwork.util.AbDialogUtil.java

/**
 * /*w w w  .ja  v  a 2  s . c  om*/
 * ???.
 * @param view
 * @param gravity ?
 * @param style
 * @return
 */
public static AbSampleDialogFragment showDialog(View view, int gravity, int style) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    // Create and show the dialog.
    AbSampleDialogFragment newFragment = AbSampleDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE,
            style, gravity);
    newFragment.setContentView(view);

    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    //    
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, dialogTag);

    return newFragment;
}

From source file:com.ab.util.AbDialogUtil.java

/**
 * //from   w  w w. j a v  a2 s .co m
 * ???().
 * @param view
 * @param gravity ?
 * @return
 */
public static AbSampleDialogFragment showDialog(View view, int gravity) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    // Create and show the dialog.
    AbSampleDialogFragment newFragment = AbSampleDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE,
            android.R.style.Theme_Holo_Light_Dialog, gravity);
    newFragment.setContentView(view);

    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    //    
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, mDialogTag);

    return newFragment;
}

From source file:com.tony.selene.util.AbDialogUtil.java

/**
 * /*from   w ww.  ja  v a 2 s .  com*/
 * ???.
 * 
 * @param view
 * @param gravity
 *            ?
 * @param style
 * @return
 */
public static AbSampleDialogFragment showDialog(View view, int gravity, int style) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    // Create and show the dialog.
    AbSampleDialogFragment newFragment = AbSampleDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE,
            style, gravity);
    newFragment.setContentView(view);

    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, dialogTag);

    return newFragment;
}

From source file:com.appsimobile.appsii.hotspotmanager.HotspotSettingsFragment.java

public HotspotSettingsFragment() {
    setStyle(DialogFragment.STYLE_NO_TITLE, 0);
    mHandler = new Handler(new Handler.Callback() {
        @Override//from w ww . j a  va 2 s. c o m
        public boolean handleMessage(Message msg) {
            onHandleMessage(msg);
            return true;
        }
    });
}