Closed Bug 1027137 Opened 5 years ago Closed 5 years ago

PageActionLayout cleanup

Categories

(Firefox for Android :: General, defect)

All
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 33

People

(Reporter: bnicholson, Assigned: bnicholson)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.
Lots of miscellaneous style/formatting nits.
Attachment #8442550 - Flags: review?(wjohnston)
Blocks: 1011712
Comment on attachment 8442550 [details] [diff] [review]
PageActionLayout cleanup

Review of attachment 8442550 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/base/toolbar/PageActionLayout.java
@@ +37,5 @@
>      private static final int DEFAULT_PAGE_ACTIONS_SHOWN = 2;
>  
> +    private final Context mContext;
> +    private final LinearLayout mLayout;
> +    private final ArrayList<PageAction> mPageActionList;

Make this a List.

@@ +134,5 @@
>          });
>      }
>  
>      private void removePageAction(String id) {
> +        for (int i = 0; i < mPageActionList.size(); i++) {

Flip this to an iterator.

@@ +193,5 @@
>  
>      private void refreshPageActionIcons() {
>          final Resources resources = mContext.getResources();
> +        for (int index = 0; index < this.getChildCount(); index++) {
> +            final ImageButton v = (ImageButton) this.getChildAt(index);

And flip this to use i instead of index.
Attachment #8442550 - Flags: review?(wjohnston) → review+
https://hg.mozilla.org/mozilla-central/rev/6b76b46afe7a
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 33
You need to log in before you can comment on or make changes to this bug.