Closed Bug 1056169 Opened 10 years ago Closed 10 years ago

Move inner class TabRow out of TabsTrayList

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 35

People

(Reporter: mhaigh, Assigned: mhaigh)

References

Details

(Whiteboard: [fixed-larch])

Attachments

(1 file, 2 obsolete files)

TabsRow will be needed by both list and grid, so move it out of the list view and in to the interface
Extracted TabsRow
Attachment #8476780 - Flags: review?(lucasr.at.mozilla)
Blocks: 1056920
Comment on attachment 8476780 [details] [diff] [review]
Move TabRow out of concrete class and in to TabsLayout interface

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

Looks good with the suggested changes.

::: mobile/android/base/tabs/TabsLayout.java
@@ +19,5 @@
>      public void setEmptyView(View view);
>      public void closeAll();
> +
> +    // ViewHolder for a row in the list
> +    public static class TabRow {

I'd rename this to something like TabsLayoutItemView ('Row' is a bit too list-oriented) and have it in its own file. The package-access on members is ok as an initial refactoring but I'd like us to encapsulate these views around more well-defined API in follow-up patches (please file it).
Attachment #8476780 - Flags: review?(lucasr.at.mozilla) → review+
Moved TabRow out of interface and renamed as suggested
Attachment #8476780 - Attachment is obsolete: true
Attachment #8479027 - Flags: review?(lucasr.at.mozilla)
Comment on attachment 8479027 [details] [diff] [review]
Move TabRow out of concrete class and rename to TabsLayoutItemView

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

Looks good with nits fixed.

::: mobile/android/base/tabs/TabsLayout.java
@@ +8,3 @@
>  import org.mozilla.gecko.tabs.TabsPanel;
>  
> +import android.view.View;

Unrelated change?

::: mobile/android/base/tabs/TabsListLayout.java
@@ +244,4 @@
>              }
>          }
>  
> +        private void assignValues(TabsLayoutItemView row, Tab tab) {

nit: row -> item for consistency (audit the patch for similar cases)
Attachment #8479027 - Flags: review?(lucasr.at.mozilla) → review+
Removed unnecessary change and fixed nits
Attachment #8479027 - Attachment is obsolete: true
Attachment #8479963 - Flags: review+
Summary: Move inner class TabRow out of TabsTrayList and in to TabsTrayInterface → Move inner class TabRow out of TabsTrayList
Can this be checked in pls? ta
Flags: needinfo?(lucasr.at.mozilla)
https://hg.mozilla.org/projects/larch/rev/85c42119a561
Flags: needinfo?(lucasr.at.mozilla)
Whiteboard: [fixed-larch]
https://hg.mozilla.org/mozilla-central/rev/85c42119a561
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 35
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: