Search in sources :

Example 31 with Dialog

use of android.app.Dialog in project facebook-android-sdk by facebook.

the class DeviceAuthDialog method onCreateDialog.

@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    dialog = new Dialog(getActivity(), R.style.com_facebook_auth_dialog);
    LayoutInflater inflater = getActivity().getLayoutInflater();
    View view = initializeContentView(DeviceRequestsHelper.isAvailable() && !this.isRetry);
    dialog.setContentView(view);
    return dialog;
}
Also used : Dialog(android.app.Dialog) AlertDialog(android.app.AlertDialog) LayoutInflater(android.view.LayoutInflater) View(android.view.View) TextView(android.widget.TextView) NonNull(android.support.annotation.NonNull)

Example 32 with Dialog

use of android.app.Dialog in project stetho by facebook.

the class DialogFragmentDescriptor method getViewAndBoundsForHighlighting.

@Nullable
@Override
public View getViewAndBoundsForHighlighting(Object element, Rect bounds) {
    final Descriptor.Host host = getHost();
    Dialog dialog = null;
    HighlightableDescriptor descriptor = null;
    if (host instanceof AndroidDescriptorHost) {
        dialog = mAccessor.getDialog(element);
        descriptor = ((AndroidDescriptorHost) host).getHighlightableDescriptor(dialog);
    }
    return descriptor == null ? null : descriptor.getViewAndBoundsForHighlighting(dialog, bounds);
}
Also used : Dialog(android.app.Dialog) ChainedDescriptor(com.facebook.stetho.inspector.elements.ChainedDescriptor) AbstractChainedDescriptor(com.facebook.stetho.inspector.elements.AbstractChainedDescriptor) Descriptor(com.facebook.stetho.inspector.elements.Descriptor) Nullable(javax.annotation.Nullable)

Example 33 with Dialog

use of android.app.Dialog in project WordPress-Android by wordpress-mobile.

the class AlertUtils method showAlert.

/**
     * Show Alert Dialog
     * @param context
     * @param titleId
     * @param message
     */
public static void showAlert(Context context, int titleId, String message) {
    Dialog dlg = new AlertDialog.Builder(context).setTitle(titleId).setPositiveButton(android.R.string.ok, null).setMessage(message).create();
    dlg.show();
}
Also used : AlertDialog(android.app.AlertDialog) Dialog(android.app.Dialog)

Example 34 with Dialog

use of android.app.Dialog in project WordPress-Android by wordpress-mobile.

the class AlertUtils method showAlert.

/**
     * Show Alert Dialog
     * @param context
     * @param titleId
     * @param messageId
     */
public static void showAlert(Context context, int titleId, int messageId) {
    Dialog dlg = new AlertDialog.Builder(context).setTitle(titleId).setPositiveButton(android.R.string.ok, null).setMessage(messageId).create();
    dlg.show();
}
Also used : AlertDialog(android.app.AlertDialog) Dialog(android.app.Dialog)

Example 35 with Dialog

use of android.app.Dialog in project platform_frameworks_base by android.

the class DialogPreference method showDialog.

/**
     * Shows the dialog associated with this Preference. This is normally initiated
     * automatically on clicking on the preference. Call this method if you need to
     * show the dialog on some other event.
     * 
     * @param state Optional instance state to restore on the dialog
     */
protected void showDialog(Bundle state) {
    Context context = getContext();
    mWhichButtonClicked = DialogInterface.BUTTON_NEGATIVE;
    mBuilder = new AlertDialog.Builder(context).setTitle(mDialogTitle).setIcon(mDialogIcon).setPositiveButton(mPositiveButtonText, this).setNegativeButton(mNegativeButtonText, this);
    View contentView = onCreateDialogView();
    if (contentView != null) {
        onBindDialogView(contentView);
        mBuilder.setView(contentView);
    } else {
        mBuilder.setMessage(mDialogMessage);
    }
    onPrepareDialogBuilder(mBuilder);
    getPreferenceManager().registerOnActivityDestroyListener(this);
    // Create the dialog
    final Dialog dialog = mDialog = mBuilder.create();
    if (state != null) {
        dialog.onRestoreInstanceState(state);
    }
    if (needInputMethod()) {
        requestInputMethod(dialog);
    }
    dialog.setOnDismissListener(this);
    dialog.show();
}
Also used : Context(android.content.Context) AlertDialog(android.app.AlertDialog) Dialog(android.app.Dialog) AlertDialog(android.app.AlertDialog) TextView(android.widget.TextView) View(android.view.View)

Aggregations

Dialog (android.app.Dialog)385 View (android.view.View)122 AlertDialog (android.app.AlertDialog)115 DialogInterface (android.content.DialogInterface)98 TextView (android.widget.TextView)87 AlertDialog (android.support.v7.app.AlertDialog)49 Intent (android.content.Intent)44 LayoutInflater (android.view.LayoutInflater)39 EditText (android.widget.EditText)39 ListView (android.widget.ListView)36 ProgressDialog (android.app.ProgressDialog)35 Context (android.content.Context)33 AdapterView (android.widget.AdapterView)31 ImageView (android.widget.ImageView)30 LinearLayout (android.widget.LinearLayout)29 WindowManager (android.view.WindowManager)28 Test (org.junit.Test)25 Button (android.widget.Button)24 BrowserDialog (acr.browser.lightning.dialog.BrowserDialog)23 NonNull (android.support.annotation.NonNull)23