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

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

Introduction

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

Prototype

int STYLE_NORMAL

To view the source code for android.support.v4.app DialogFragment STYLE_NORMAL.

Click Source Link

Document

Style for #setStyle(int,int) : a basic, normal dialog.

Usage

From source file:org.ciasaboark.tacere.activity.fragment.EventDetailsFragment.java

@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    super.onCreateDialog(savedInstanceState);
    setStyle(DialogFragment.STYLE_NORMAL, R.style.Dialog);

    long instanceId = getArguments().getLong("instanceId");
    context = getActivity();//from w ww. ja  va  2 s . com
    dataSetManager = new DataSetManager(this, context);
    databaseInterface = DatabaseInterface.getInstance(context);
    prefs = new Prefs(context);
    authenticator = new Authenticator(context);

    try {
        event = databaseInterface.getEvent(instanceId);
    } catch (NoSuchEventInstanceException e) {
        Log.e(TAG, "unable to find event with id " + instanceId);
        return null;
    }

    AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(
            new ContextThemeWrapper(getActivity(), R.style.Dialog));
    view = getActivity().getLayoutInflater().inflate(R.layout.dialog_event_longclick, null);
    setupWidgetsForView();
    dialogBuilder.setView(view);

    //the clear button should only be visible if the event has a custom ringer or if the events
    //series has a custom ringer set
    EventManager eventManager = new EventManager(context, event);

    if (eventManager.getRingerSource() == RingerSource.EVENT_SERIES
            || eventManager.getRingerSource() == RingerSource.INSTANCE) {
        dialogBuilder.setNegativeButton(R.string.clear, new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialogInterface, int i) {
                resetEvent();
            }
        });

    }

    dialogBuilder.setNeutralButton(R.string.cancel, new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialog, int which) {
            //nothing to do here
        }
    });

    dialogBuilder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialog, int which) {
            saveSettings();
        }
    });

    //the positive button should only be enabled if the selected ringer is not UNDEFINED
    AlertDialog dialog = dialogBuilder.create();
    dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);

    return dialog;
}

From source file:com.akop.bach.fragment.AlertDialogFragment.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setStyle(DialogFragment.STYLE_NORMAL, android.R.style.Theme_Dialog);
}

From source file:eu.mhutti1.utils.storage.support.StorageSelectDialog.java

@Override
public void onCreate(Bundle savedInstanceState) {
    if (getArguments() != null) {
        // Set string values
        mInternal = getArguments().getString(STORAGE_DIALOG_INTERNAL, mInternal);
        mExternal = getArguments().getString(STORAGE_DIALOG_EXTERNAL, mExternal);
        // Set the theme to a supplied value
        if (getArguments().containsKey(STORAGE_DIALOG_THEME)) {
            setStyle(DialogFragment.STYLE_NORMAL, getArguments().getInt(STORAGE_DIALOG_THEME));
        }//w ww. j  av a  2 s.c o  m
    }
    super.onCreate(savedInstanceState);
}

From source file:jfabrix101.lib.dialog.CustomViewDialogFragment.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.setCancelable(true);
    int style = DialogFragment.STYLE_NORMAL, theme = 0;
    setStyle(style, theme);/*from w w w.j  a  v a2  s  .c  o  m*/
}

From source file:com.rnd.snapsplit.view.DialogFragmentFingerprintAuthentication.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    callback = (DialogClickListener) getTargetFragment();

    // Do not create a new Fragment when the Activity is re-created such as orientation changes.
    setRetainInstance(true);/*from   w  ww. java  2  s  .c o  m*/
    setStyle(DialogFragment.STYLE_NORMAL, android.R.style.Theme_Material_Light_Dialog);
}

From source file:de.markusressel.android.tutorialtooltip.DialogFragmentTest.java

@Nullable
@Override//  w  w w .  jav  a  2 s . co  m
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.dialog_test, container);
    setStyle(DialogFragment.STYLE_NORMAL, R.style.DialogTheme);

    button = (Button) rootView.findViewById(R.id.testbutton);
    button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            showTutorialTooltip();
        }
    });

    return rootView;
}

From source file:com.fa.mastodon.fragment.ViewMediaFragment.java

@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setStyle(DialogFragment.STYLE_NORMAL, R.style.Dialog_FullScreen);

    gyroscopeObserver = new GyroscopeObserver();
    // Set the maximum radian the device should rotate to show image's bounds.
    // It should be set between 0 and /2.
    // The default value is /9.
    gyroscopeObserver.setMaxRotateRadian(Math.PI / 9);
}

From source file:th.in.ffc.app.FFCSearchListDialog.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setStyle(DialogFragment.STYLE_NORMAL, android.R.style.Theme_Holo_Light_Dialog_NoActionBar);
}

From source file:com.akop.bach.fragment.playstation.GameCatalogFilterFragment.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mSortOrder = getArguments().getInt("sortOrder");
    mReleaseStatus = getArguments().getInt("releaseStatus");
    mConsole = getArguments().getInt("console");
    mAccount = (PsnAccount) getArguments().getParcelable("account");

    if (savedInstanceState != null) {
        mSortOrder = savedInstanceState.getInt("sortOrder", mSortOrder);
        mReleaseStatus = savedInstanceState.getInt("releaseStatus", mReleaseStatus);
        mConsole = savedInstanceState.getInt("console", mConsole);
    }/*from   w ww . j  ava 2  s  .  co  m*/

    setStyle(DialogFragment.STYLE_NORMAL, android.R.style.Theme_Dialog);
}

From source file:de.azapps.mirakel.new_ui.fragments.AddSubtaskFragment.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setStyle(DialogFragment.STYLE_NORMAL, R.style.DialogStyle);
    Bundle arguments = getArguments();/*w ww.j  a  v a2  s  . c  o  m*/
    task = arguments.getParcelable(ARGUMENT_PARENT_TASK);
}