Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c8ab265 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove unnecessary casts on calls to findViewById" into oc-dev

parents b7f0db8d 51efddbd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ public class ChooseAccountActivity extends Activity {
        setContentView(R.layout.choose_account);

        // Setup the list
        ListView list = (ListView) findViewById(android.R.id.list);
        ListView list = findViewById(android.R.id.list);
        // Use an existing ListAdapter that will map an array of strings to TextViews
        list.setAdapter(new AccountArrayAdapter(this,
                android.R.layout.simple_list_item_1, mAccountInfos));
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ public class ChooseAccountTypeActivity extends Activity {

        setContentView(R.layout.choose_account_type);
        // Setup the list
        ListView list = (ListView) findViewById(android.R.id.list);
        ListView list = findViewById(android.R.id.list);
        // Use an existing ListAdapter that will map an array of strings to TextViews
        list.setAdapter(new AccountArrayAdapter(this,
                android.R.layout.simple_list_item_1, mAuthenticatorInfosToDisplay));
+3 −3
Original line number Diff line number Diff line
@@ -248,7 +248,7 @@ public class ChooseTypeAndAccountActivity extends Activity
        populateUIAccountList(listItems);

        // Only enable "OK" button if something has been selected.
        mOkButton = (Button) findViewById(android.R.id.button2);
        mOkButton = findViewById(android.R.id.button2);
        mOkButton.setEnabled(mSelectedItemIndex != SELECTED_ITEM_NONE);
    }

@@ -592,7 +592,7 @@ public class ChooseTypeAndAccountActivity extends Activity
     * If not specified then makes the description invisible.
     */
    private void overrideDescriptionIfSupplied(String descriptionOverride) {
      TextView descriptionView = (TextView) findViewById(R.id.description);
      TextView descriptionView = findViewById(R.id.description);
      if (!TextUtils.isEmpty(descriptionOverride)) {
          descriptionView.setText(descriptionOverride);
      } else {
@@ -605,7 +605,7 @@ public class ChooseTypeAndAccountActivity extends Activity
     * based on {@code mSelectedItemIndex} member variable.
     */
    private final void populateUIAccountList(String[] listItems) {
      ListView list = (ListView) findViewById(android.R.id.list);
      ListView list = findViewById(android.R.id.list);
      list.setAdapter(new ArrayAdapter<String>(this,
              android.R.layout.simple_list_item_single_choice, listItems));
      list.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
+2 −2
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ public class GrantCredentialsPermissionActivity extends Activity implements View
            return;
        }

        final TextView authTokenTypeView = (TextView) findViewById(R.id.authtoken_type);
        final TextView authTokenTypeView = findViewById(R.id.authtoken_type);
        authTokenTypeView.setVisibility(View.GONE);

        final AccountManagerCallback<String> callback = new AccountManagerCallback<String>() {
@@ -116,7 +116,7 @@ public class GrantCredentialsPermissionActivity extends Activity implements View
        findViewById(R.id.allow_button).setOnClickListener(this);
        findViewById(R.id.deny_button).setOnClickListener(this);

        LinearLayout packagesListView = (LinearLayout) findViewById(R.id.packages_list);
        LinearLayout packagesListView = findViewById(R.id.packages_list);

        for (String pkg : packages) {
            String packageLabel;
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ import com.android.internal.R;
 * and add your view to it:
 *
 * <pre>
 * FrameLayout fl = (FrameLayout) findViewById(android.R.id.custom);
 * FrameLayout fl = findViewById(android.R.id.custom);
 * fl.addView(myView, new LayoutParams(MATCH_PARENT, WRAP_CONTENT));
 * </pre>
 *
Loading