List of usage examples for android.content DialogInterface toString
public String toString()
From source file:com.android.vending.billing.InAppBillingService.LACK.listAppsFragment.java
public void changeDefaultDir() { AlertDlg localAlertDlg = new AlertDlg(frag.getContext()); localAlertDlg.setTitle(2131165411); LinearLayout localLinearLayout = (LinearLayout) View.inflate(frag.getContext(), 2130968596, null); final EditText localEditText = (EditText) localLinearLayout.findViewById(2131558502); localEditText.setText(getConfig().getString("basepath", "/")); localAlertDlg.setView(localLinearLayout); localAlertDlg.setNegativeButton(2131165563, null) .setPositiveButton(2131165187, new DialogInterface.OnClickListener() { public void onClick(final DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt) { paramAnonymousDialogInterface = localEditText.getText(); if ((paramAnonymousDialogInterface.toString().contains("/")) && (!paramAnonymousDialogInterface.toString().equals("/"))) { final Object localObject2 = paramAnonymousDialogInterface.toString().trim() .replaceAll("\\s+", ".").split("\\/+"); paramAnonymousDialogInterface = ""; int i = localObject2.length; paramAnonymousInt = 0; final Object localObject1; while (paramAnonymousInt < i) { String str = localObject2[paramAnonymousInt]; localObject1 = paramAnonymousDialogInterface; if (!str.equals("")) { localObject1 = paramAnonymousDialogInterface + "/" + str; }// w w w. jav a2s .c o m paramAnonymousInt += 1; paramAnonymousDialogInterface = (DialogInterface) localObject1; } if (!new File(paramAnonymousDialogInterface).exists()) { if ((listAppsFragment.this.testPath(true, paramAnonymousDialogInterface)) && (!paramAnonymousDialogInterface.startsWith(listAppsFragment.getInstance() .getDir("sdcard", 0).getAbsolutePath()))) { listAppsFragment.getConfig().edit() .putString("path", paramAnonymousDialogInterface).commit(); listAppsFragment.getConfig().edit().putBoolean("manual_path", true).commit(); listAppsFragment.getConfig().edit().putBoolean("path_changed", true).commit(); localObject1 = new File( listAppsFragment.getConfig().getString("basepath", "Noting")); localObject2 = new File(paramAnonymousDialogInterface); if (!((File) localObject1).exists()) { System.out.println("Directory does not exist."); } } else { return; } listAppsFragment.this.runWithWait(new Runnable() { public void run() { try { Utils.copyFolder(localObject1, localObject2); new Utils("").deleteFolder(localObject1); listAppsFragment.getConfig().edit() .putString("basepath", paramAnonymousDialogInterface).commit(); listAppsFragment.basepath = paramAnonymousDialogInterface; listAppsFragment.this.showMessage(Utils.getText(2131165748), Utils.getText(2131165553) + paramAnonymousDialogInterface); return; } catch (Exception localException) { localException.printStackTrace(); listAppsFragment.this.showMessage(Utils.getText(2131165748), Utils.getText(2131165569)); } } }); return; } listAppsFragment.this.showMessage(Utils.getText(2131165748), Utils.getText(2131165445)); return; } listAppsFragment.this.showMessage(Utils.getText(2131165748), Utils.getText(2131165444)); } }).create().show(); }
From source file:com.android.vending.billing.InAppBillingService.LACK.listAppsFragment.java
public void changeDayOnUp() { AlertDlg localAlertDlg = new AlertDlg(frag.getContext()); localAlertDlg.setTitle(2131165404); LinearLayout localLinearLayout = (LinearLayout) View.inflate(frag.getContext(), 2130968597, null); final EditText localEditText = (EditText) localLinearLayout.findViewById(2131558503); localEditText.setText("" + getConfig().getInt("days_on_up", 1)); localAlertDlg.setView(localLinearLayout); localAlertDlg.setNegativeButton(2131165563, null) .setPositiveButton(2131165187, new DialogInterface.OnClickListener() { public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt) { paramAnonymousDialogInterface = localEditText.getText(); if (listAppsFragment.this.numberCheck(paramAnonymousDialogInterface)) { listAppsFragment.getConfig().edit() .putInt("days_on_up", Integer.valueOf(paramAnonymousDialogInterface.toString()).intValue()) .commit(); listAppsFragment.getConfig().edit().putBoolean("settings_change", true).commit(); listAppsFragment.getConfig().edit().putBoolean("lang_change", true).commit(); listAppsFragment.runResume = true; }// w w w.ja v a 2s .com } }).create().show(); }