Java Code Examples for android.support.v7.app.AlertDialog#BUTTON_NEGATIVE

The following examples show how to use android.support.v7.app.AlertDialog#BUTTON_NEGATIVE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CredentialsDialogFragment.java    From Cirrus_depricated with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void onClick(DialogInterface dialog, int which) {
    if (which == AlertDialog.BUTTON_POSITIVE) { 

        String username = mUsernameET.getText().toString();
        String password = mPasswordET.getText().toString();

        // Proceed with the authentication
        mHandler.proceed(username, password);

    } else if (which == AlertDialog.BUTTON_NEGATIVE) {
        mWebView.stopLoading();
        ((AuthenticatorActivity)getActivity()).doNegativeAuthenticatioDialogClick();
    }

    dialog.dismiss();
}
 
Example 2
Source File: RootDetectedDialog.java    From android-wallet-app with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onClick(DialogInterface dialogInterface, int which) {
    switch (which) {
        case AlertDialog.BUTTON_NEGATIVE:
            getActivity().finish();
            break;
        case AlertDialog.BUTTON_NEUTRAL:
            SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
            prefs.edit().putBoolean(Constants.PREFERENCE_RUN_WITH_ROOT, true).apply();
            getDialog().dismiss();
            break;
    }
}
 
Example 3
Source File: PassphraseDialogFragment.java    From delion with Apache License 2.0 4 votes vote down vote up
@Override
public void onClick(DialogInterface dialog, int which) {
    if (which == AlertDialog.BUTTON_NEGATIVE) {
        handleCancel();
    }
}
 
Example 4
Source File: PassphraseDialogFragment.java    From AndroidChromium with Apache License 2.0 4 votes vote down vote up
@Override
public void onClick(DialogInterface dialog, int which) {
    if (which == AlertDialog.BUTTON_NEGATIVE) {
        handleCancel();
    }
}
 
Example 5
Source File: PassphraseDialogFragment.java    From 365browser with Apache License 2.0 4 votes vote down vote up
@Override
public void onClick(DialogInterface dialog, int which) {
    if (which == AlertDialog.BUTTON_NEGATIVE) {
        handleCancel();
    }
}