public void SetAlertDialog(DialogInterface arg0, boolean show) { if (show) { try { Field mField = arg0.getClass().getSuperclass().getDeclaredField("mShowing"); mField.setAccessible(true); mField.set(arg0, true); } catch (NoSuchFieldException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } } else { try { Field mField = arg0.getClass().getSuperclass().getDeclaredField("mShowing"); mField.setAccessible(true); mField.set(arg0, false); } catch (NoSuchFieldException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalArgumentException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
public void onClick(DialogInterface paramDialogInterface, int paramInt) { paramDialogInterface.dismiss(); a.getAppData().p(); paramDialogInterface = new el(ActivityLogin.e(a)); paramDialogInterface.execute(new Object[0]); a.showLoadingDialog(paramDialogInterface); }
public boolean onKey(DialogInterface dialoginterface, int i, KeyEvent keyevent) { if (i == 82 || i == 4) { if (keyevent.getAction() == 0 && keyevent.getRepeatCount() == 0) { dialoginterface = mDialog.getWindow(); if (dialoginterface != null) { dialoginterface = dialoginterface.getDecorView(); if (dialoginterface != null) { dialoginterface = dialoginterface.getKeyDispatcherState(); if (dialoginterface != null) { dialoginterface.startTracking(keyevent, this); return true; } } } } else if (keyevent.getAction() == 1 && !keyevent.isCanceled()) { Object obj = mDialog.getWindow(); if (obj != null) { obj = ((Window) (obj)).getDecorView(); if (obj != null) { obj = ((View) (obj)).getKeyDispatcherState(); if (obj != null && ((android.view.KeyEvent.DispatcherState) (obj)).isTracking(keyevent)) { mMenu.close(true); dialoginterface.dismiss(); return true; } } } } } return mMenu.performShortcut(i, keyevent, 0); }
/** Handle buttons click on dirty or delete confirmation popup. */ public void onClick(DialogInterface dialog, int which) { switch (currentDialog) { case DIALOG_DIRTY: switch (which) { case DialogInterface.BUTTON_POSITIVE: dialog.dismiss(); this.dirtyQuit = true; this.save(); break; case DialogInterface.BUTTON_NEGATIVE: dialog.dismiss(); this.kill = true; this.finish(); break; case DialogInterface.BUTTON_NEUTRAL: dialog.dismiss(); break; } break; case DIALOG_DELETE: switch (which) { case DialogInterface.BUTTON_POSITIVE: dialog.dismiss(); this.delete(); break; // There is no listener bound to negative: default is dismiss. } break; } }
public void onClick(DialogInterface paramDialogInterface, int paramInt) { paramDialogInterface = a.c(); if (paramDialogInterface.equals(w.d(a))) { w.e(a); } while ((!paramDialogInterface.equals(w.f(a))) || (!w.g(a))) { return; } w.e(a); }
public final void onCancel(DialogInterface paramDialogInterface) { if ((faD.cjq != null) && (faD.ckG.isEmpty())) { faD.cjq.dismiss(); paramDialogInterface = faD.ckH.iterator(); while (paramDialogInterface.hasNext()) { j localj = (j) paramDialogInterface.next(); ah.tF().c(localj); } faD.ckH.clear(); } }
public void onClick(DialogInterface dialoginterface, int i) { if (isResumed()) { dialoginterface = d.o().a(TrackerOption.TAP_GESTURE); d d1 = (d) b.get(i); if (!d1.equals(dialoginterface.c())) { dialoginterface.a(d1); an.a().a(d, getActivity()); ((TrackerDetailsActivity) getActivity()).c(); } dismiss(); } }
public void onClick(DialogInterface dialog, int which) { switch (which) { case BUTTON_NEGATIVE: dialog.dismiss(); break; case BUTTON_NEUTRAL: dialog.dismiss(); listener.colorSelected(-1); break; case BUTTON_POSITIVE: listener.colorSelected(selectedColor); break; } }
@Override public void onClick(DialogInterface dialog, int which) { switch (which) { case DialogInterface.BUTTON_POSITIVE: timePicker.clearFocus(); result = timePicker.getCurrentHour() + "-" + timePicker.getCurrentMinute(); persistString(result); callChangeListener(result); dialog.dismiss(); break; case DialogInterface.BUTTON_NEGATIVE: dialog.dismiss(); break; } }
@Override public void onClick(DialogInterface dialog, int which) { // checks if this button is the ok button or not if (which == -1) { // if just ok is pressed then get the selected first value Section section = lstSection.get(selectionVal); sectionId = String.valueOf(section.getSectionId()); sectionName = section.getSectionName().toString(); Prefs.addKey(SettingsActivity.this, Prefs.SECTION_ID, sectionId); Prefs.addKey(SettingsActivity.this, Prefs.SECTION_NAME, sectionName); txtSectionSelection.setText(mLanguageManager.getSelectedSection() + ": " + sectionName); Global.logd(TAG + " section name: " + sectionName); txtSectionSelection.setTextColor(getResources().getColor(R.color.black)); dialog.dismiss(); } else if (which != -1) { isSectionSelectionChanged = true; selectionVal = which; Section section = lstSection.get(which); sectionId = String.valueOf(section.getSectionId()); sectionName = section.getSectionName().toString(); Log.i(TAG, "value of sectionId : " + sectionId); Prefs.addKey(SettingsActivity.this, Prefs.SECTION_ID, sectionId); Prefs.addKey(SettingsActivity.this, Prefs.SECTION_NAME, sectionName); refreshData(dialog); } }
public void onClick(DialogInterface paramDialogInterface, int paramInt) { while (true) { try { paramDialogInterface.dismiss(); if (!c.au(true)) break; if ((z.a(am.a(this.TS)) instanceof MyInfoActivity)) { ((MyInfoActivity) z.a(am.a(this.TS))).oD(); j localj = new j(); localj.a(new ap(this, this.TN)); localj.t(this.TN.ll(), this.TN.lm()); return; } if ((z.a(am.a(this.TS)) instanceof UserDetailsActivity)) { ((UserDetailsActivity) z.a(am.a(this.TS))).oD(); continue; } } catch (Exception localException) { localException.printStackTrace(); return; } if ((z.c(am.a(this.TS)) != null) && (!z.c(am.a(this.TS)).isShowing()) && (!z.a(am.a(this.TS)).isFinishing())) z.c(am.a(this.TS)).show(); } }
@Background void task(String r, String num, DialogInterface dialog) { if (currentAddress == null) { return; } String addressCompl = currentAddress.getSubAdminArea() != null ? currentAddress.getSubAdminArea() : currentAddress.getLocality(); List<Address> addresses = GPSUtils.getFromLocationName(getActivity(), r + ", " + num + " - " + (addressCompl)); if (addresses.isEmpty()) { toast(getString(R.string.address_not_found)); dialog.dismiss(); } else { final Address address = addresses.get(0); street = address.getThoroughfare(); if (!TextUtils.isEmpty(num) && StringUtils.isNumeric(num.substring(0, 1))) { number = num; } else { number = ""; } updateUiAdapter(address); } }
@Override public void onDestroy() { super.onDestroy(); if (mWarnInstallApps != null) { mWarnInstallApps.dismiss(); } }
public void onClick(DialogInterface dialog, int which) { if (DialogInterface.BUTTON_POSITIVE == which) { super.onBackPressed(); } else if (DialogInterface.BUTTON_NEGATIVE == which) { dialog.cancel(); } }
public final void onClick(DialogInterface dialoginterface, int i) { dialoginterface.dismiss(); if (dk.d(a) != null && ei.a()[dk.d(a).getId()] == ei.e) { dk.d(a).setSelected(false); dk.a(a, -1); } }
@Background void dialogNumberTask(String num1, DialogInterface dialog) { List<Address> addresses = GPSUtils.getFromLocationName( getActivity(), street + ", " + num1 + " - " + (currentAddress.getSubAdminArea() != null ? currentAddress.getSubAdminArea() : currentAddress.getLocality())); if (addresses.isEmpty()) { toast(getString(R.string.address_not_found)); dialog.dismiss(); } else { final Address address = addresses.get(0); street = address.getThoroughfare(); if (!num1.isEmpty() && StringUtils.isNumeric(num1.substring(0, 1))) { number = num1; } else { number = ""; } updateUiAdapter(address); } }
@Override public void onClick(DialogInterface dialog, int which) { switch (which) { case DialogInterface.BUTTON_POSITIVE: // Yes button clicked // webView.clearView(); dialog.dismiss(); finish(); break; case DialogInterface.BUTTON_NEGATIVE: // No button clicked dialog.dismiss(); break; } }
public void onClick(DialogInterface paramDialogInterface, int paramInt) { paramDialogInterface.dismiss(); if (bd.a(a.b())) { ag.a(a, a.getString(2131427727, new Object[] {b}), 1); return; } a.a(a, b, c); }
public void onClick(DialogInterface dialog, int which) { if (which == DialogInterface.BUTTON_NEGATIVE) { mCanceled = true; mProgressDialog.dismiss(); } else { Log.e(LOG_TAG, "Unknown button event has come: " + dialog.toString()); } }
@Override public void onClick(DialogInterface dialog, int which) { if (mCallback != null) { mNumberPicker.clearFocus(); mCallback.onNumberSet(mDialogId, mNumberPicker.getValue()); dialog.dismiss(); } }
/** * Given a dialog, this method dismisses it, then it creates a new AsyncDumper and starts * executing it passing all the selected items in the given dialog. * * @param dialog The DialogInterface to dismiss */ private void onConfirm(DialogInterface dialog) { dialog.dismiss(); // If no items selected, no need to continue if (selected.isEmpty()) return; // TODO: Run a new AsyncDumper }
@Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); if ((0 > which) || (TextSizeSetting.VALUES.size() <= which)) { return; } textSize(TextSizeSetting.VALUES.get(which)); }
public void onClick(DialogInterface paramDialogInterface, int paramInt) { gh.a(a, paramInt); gh.b(a, a.b[gh.a(a)]); if (gh.b(a) != null) { gh.b(a).a(gh.c(a), a.c[gh.a(a)]); } paramDialogInterface.dismiss(); }
/** * dialog消失的方法 * * @param dialog */ private void destoryDialog(DialogInterface dialog) { try { Field field = dialog.getClass().getSuperclass().getDeclaredField("mShowing"); field.setAccessible(true); field.set(dialog, true); } catch (Exception e) { e.printStackTrace(); } }
@Override public void onClick(DialogInterface dialog, int id) { switch (id) { case DialogInterface.BUTTON_POSITIVE: dialog.dismiss(); listener.onAccept(this); break; } }
public void onClick(DialogInterface paramDialogInterface, int paramInt) { paramDialogInterface = new Intent("android.intent.action.VIEW"); Activity localActivity = b.a; paramInt = a; paramDialogInterface.setData( Uri.parse(((hpz) ilh.a(localActivity, hpz.class)).a(paramInt).a("app_upgrade_url", ""))); b.a.startActivity(paramDialogInterface); b.a.finish(); }
@Override public void onClick(DialogInterface dialog, int which) { if (which == DialogInterface.BUTTON_POSITIVE) { notifyItemsSelected(); } else { notifyDialogCancelled(); } dialog.dismiss(); }
@Override public void onClick(DialogInterface dialogInterface, int i) { switch (i) { case Dialog.BUTTON_POSITIVE: if (settingsActivityAction.equals(Settings.ACTION_WIFI_SETTINGS)) dialogInterface.cancel(); startActivity(new Intent(settingsActivityAction)); break; } }
public void onClick(DialogInterface dialoginterface, int i) { HashMap hashmap = new HashMap(); hashmap.put("sourceEvent", a.a); c.a("userConfirmed", hashmap, c.d, c.c, c.e, b + 1); dialoginterface.dismiss(); if (o.u(c) != null && c.getCurrentBinding() == 3) { o.u(c).start(); } }
@Override public void onCancel(DialogInterface dialog) { dialog.cancel(); NativeInterface.aprilActivity.glView.queueEvent( new Runnable() { public void run() { NativeInterface.onDialogCancel(); } }); }