Example usage for android.support.v4.app DialogFragment STYLE_NO_TITLE

List of usage examples for android.support.v4.app DialogFragment STYLE_NO_TITLE

Introduction

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

Prototype

int STYLE_NO_TITLE

To view the source code for android.support.v4.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.tony.selene.dialog.AbDialogUtil.java

/**
 * /*  w  w w . ja v a2  s.c  o m*/
 * ???.
 * 
 * @param view
 * @param animEnter
 * @param animExit
 * @param animPopEnter
 * @param animPopExit
 * @param gravity
 *            ?
 * @return
 */
public static AbSampleDialogFragment showDialog(View view, int animEnter, int animExit, int animPopEnter,
        int animPopExit, 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.setCustomAnimations(animEnter, animExit, animPopEnter, animPopExit);
    newFragment.show(ft, dialogTag);
    return newFragment;
}

From source file:planets.position.ViewWhatsUp.java

private void showProgressDialog() {
    calcDialog = CalcDialog.newInstance(R.string.up_dialog);
    calcDialog.setStyle(DialogFragment.STYLE_NO_TITLE, 0);
    calcDialog.show(getSupportFragmentManager(), "calcDialogView");
}

From source file:com.nile.kmooc.view.LoginActivity.java

public void showNoNetworkDialog() {
    Bundle args = new Bundle();
    args.putString(SimpleAlertDialog.EXTRA_TITLE, getString(com.nile.kmooc.R.string.reset_no_network_title));
    args.putString(SimpleAlertDialog.EXTRA_MESSAGE,
            getString(com.nile.kmooc.R.string.reset_no_network_message));

    SimpleAlertDialog noNetworkFragment = SimpleAlertDialog.newInstance(args);
    noNetworkFragment.setStyle(DialogFragment.STYLE_NO_TITLE, 0);
    noNetworkFragment.show(getSupportFragmentManager(), "dialog");
}

From source file:planets.position.Planets.java

/**
 * Loads the device location from the DB, or shows the location alert dialog
 * box./*from  w w  w . j  ava  2  s . c om*/
 */
private void loadLocation() {
    if (checkLocation()) {
        Cursor locCur = cr.query(Uri.withAppendedPath(PlanetsDbProvider.LOCATION_URI, String.valueOf(0)),
                projection, null, null, null);
        locCur.moveToFirst();
        latitude = locCur.getDouble(locCur.getColumnIndexOrThrow("lat"));
        longitude = locCur.getDouble(locCur.getColumnIndexOrThrow("lng"));
        offset = locCur.getDouble(locCur.getColumnIndexOrThrow("offset"));
        elevation = locCur.getDouble(locCur.getColumnIndexOrThrow("elevation"));
    } else {
        // showLocationDataAlert();
        locationDialog = LocationDialog.newInstance();
        locationDialog.setStyle(DialogFragment.STYLE_NO_TITLE, 0);
        locationDialog.show(getSupportFragmentManager(), "locDialogMain");
    }
}

From source file:org.edx.mobile.view.LoginActivity.java

public void showResetSuccessDialog() {
    Map<String, String> dialogMap = new HashMap<String, String>();
    dialogMap.put("title", getString(R.string.success_dialog_title_help));
    dialogMap.put("message_1", getString(R.string.success_dialog_message_help));

    successFragment = SuccessDialogFragment.newInstance(dialogMap);
    successFragment.setStyle(DialogFragment.STYLE_NO_TITLE, 0);
    successFragment.show(getSupportFragmentManager(), "dialog");
}

From source file:org.edx.mobile.view.LoginActivity.java

public void showResetFailure(String text) {
    Map<String, String> dialogMap = new HashMap<String, String>();
    dialogMap.put("title", getString(R.string.title_reset_password_failed));
    dialogMap.put("message_1", text);

    successFragment = SuccessDialogFragment.newInstance(dialogMap);
    successFragment.setStyle(DialogFragment.STYLE_NO_TITLE, 0);
    successFragment.show(getSupportFragmentManager(), "dialog");

}

From source file:org.edx.mobile.view.LoginActivity.java

public void showNoNetworkDialog() {
    Bundle args = new Bundle();
    args.putString(SimpleAlertDialog.EXTRA_TITLE, getString(R.string.reset_no_network_title));
    args.putString(SimpleAlertDialog.EXTRA_MESSAGE, getString(R.string.reset_no_network_message));

    NoNetworkFragment = SimpleAlertDialog.newInstance(args);
    NoNetworkFragment.setStyle(DialogFragment.STYLE_NO_TITLE, 0);
    NoNetworkFragment.show(getSupportFragmentManager(), "dialog");
}

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

/**
 * ??./*from  www  .j a v  a2s.  c  o  m*/
 * 
 * @param context
 *            the context
 * @param indeterminateDrawable
 * @param message
 *            the message
 * @param style
 */
public static AbLoadDialogFragment showLoadDialog(Context context, int indeterminateDrawable, String message,
        int style) {
    FragmentActivity activity = (FragmentActivity) context;
    AbLoadDialogFragment newFragment = AbLoadDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE, style);
    newFragment.setIndeterminateDrawable(indeterminateDrawable);
    newFragment.setMessage(message);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, dialogTag);
    return newFragment;
}

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

/**
 * ??./*w w w.j  a  va 2s.  com*/
 * 
 * @param context
 *            the context
 * @param indeterminateDrawable
 * @param message
 *            the message
 * @param style
 * @param abDialogOnRefreshListener
 */
public static AbLoadDialogFragment showLoadDialog(Context context, int indeterminateDrawable, String message,
        int style, AbDialogOnLoadListener abDialogOnLoadListener) {
    FragmentActivity activity = (FragmentActivity) context;
    AbLoadDialogFragment newFragment = AbLoadDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE, style);
    newFragment.setIndeterminateDrawable(indeterminateDrawable);
    newFragment.setMessage(message);
    newFragment.setAbDialogOnLoadListener(abDialogOnLoadListener);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, dialogTag);
    return newFragment;
}

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

/**
 * ??./*  w  w w. j  a  va  2 s .c om*/
 * 
 * @param context
 *            the context
 * @param indeterminateDrawable
 * @param message
 *            the message
 * @param style
 */
public static AbRefreshDialogFragment showRefreshDialog(Context context, int indeterminateDrawable,
        String message, int style) {
    FragmentActivity activity = (FragmentActivity) context;
    AbRefreshDialogFragment newFragment = AbRefreshDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE,
            style);
    newFragment.setIndeterminateDrawable(indeterminateDrawable);
    newFragment.setMessage(message);
    newFragment.setAbDialogOnLoadListener(null);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, dialogTag);
    return newFragment;
}