Example usage for android.widget LinearLayout findViewById

List of usage examples for android.widget LinearLayout findViewById

Introduction

In this page you can find the example usage for android.widget LinearLayout findViewById.

Prototype

@Nullable
public final <T extends View> T findViewById(@IdRes int id) 

Source Link

Document

Finds the first descendant view with the given ID, the view itself if the ID matches #getId() , or null if the ID is invalid (< 0) or there is no matching view in the hierarchy.

Usage

From source file:com.android.vending.billing.InAppBillingService.LACK.listAppsFragment.java

public void showAbout() {
      LinearLayout localLinearLayout = (LinearLayout) View.inflate(patchAct, 2130968576, null);
      Object localObject = (LinearLayout) localLinearLayout.findViewById(2131558401).findViewById(2131558403);
      String str1 = Utils.getText(2131165737) + version + "\n";
      localObject = (TextView) ((LinearLayout) localObject).findViewById(2131558404);
      ((TextView) localObject).append(Utils.getColoredText(str1, "#ffffffff", "bold"));
      ((TextView) localObject)//from   w  w w. j a  va 2  s .c  o m
              .append(Utils.getColoredText("----------------------------------\n\n", "#ffffffff", "bold"));
      ((TextView) localObject).append(
              Utils.getColoredText(Utils.getText(2131165188) + " " + basepath + "\n\n", "#ffffffff", "bold"));
      ((TextView) localObject)
              .append(Utils.getColoredText(Utils.getText(2131165629) + "\n\n", "#ffff0000", "bold"));
      ((TextView) localObject)
              .append(Utils.getColoredText(Utils.getText(2131165189) + "\n", "#ffffff00", "bold"));
      ((TextView) localObject)
              .append(Utils.getColoredText("\n" + Utils.getText(2131165801) + "\n\n", "#ffffffff", "bold"));
      ((TextView) localObject).append(Utils.getColoredText(
              "\nThanks to:\nUsed source code: pyler, Mikanoshi@4pda.ru\nm0rpheus@TeamURET, Site WebIconSet.com - Smile icons\nslycog@XDA - Custom Patch Help translate\nIcons to menu - Sergey Kamashki\nTemplate for ADS - And123\n\nTranslation project:\nhttps://www.transifex.com/chelpus/luckypatcher/\nSupport by email: lp.chelpus@gmail.com\nGood Luck!\nChelpuS",
              "#ffffffff", "bold"));
      new AlertDlg(patchAct).setTitle(2131165191).setCancelable(true).setIcon(17301659)
              .setPositiveButton(Utils.getText(2131165587), null)
              .setNeutralButton("Changelog", new DialogInterface.OnClickListener() {
                  public void onClick(DialogInterface paramAnonymousDialogInterface, int paramAnonymousInt) {
                      if (new File(listAppsFragment.basepath + "/Changes/changelog.txt").exists()) {
                          listAppsFragment.this.showMessage(Utils.getText(2131165251), Utils.read_from_file(
                                  new File(listAppsFragment.basepath + "/Changes/changelog.txt")));
                          return;
                      }
                      listAppsFragment.this.showMessage(Utils.getText(2131165251), Utils.getText(2131165577));
                  }
              }).setView(localLinearLayout).setOnCancelListener(new DialogInterface.OnCancelListener() {
                  public void onCancel(DialogInterface paramAnonymousDialogInterface) {
                      paramAnonymousDialogInterface.dismiss();
                  }
              }).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;
                      }/*from ww  w  . j a va  2  s  .c  om*/
                  }
              }).create().show();
  }

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;
                              }//  www.j av  a2  s  .  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();
  }