Closed Bug 1176886 Opened 10 years ago Closed 10 years ago

[Linter: UselessParent] Remove/merge unnecessary parent layouts

Categories

(Firefox for Android Graveyard :: Theme and Visual Design, defect)

All
Android
defect
Not set
normal

Tracking

(firefox41 fixed)

RESOLVED FIXED
Firefox 41
Tracking Status
firefox41 --- fixed

People

(Reporter: mcomella, Assigned: mcomella)

References

Details

(Whiteboard: [needs upstreaming])

Attachments

(2 files)

According to lint: ../../src/main/res/layout/sync_account.xml:63: This LinearLayout layout or its LinearLayout parent is useless 60 <LinearLayout 61 style="@style/SyncBottomContainer" > 62 63 <LinearLayout 64 style="@style/SyncBottom" > 65 <Button ../../src/main/res/layout/sync_redirect_to_setup.xml:24: This LinearLayout layout or its LinearLayout parent is useless 21 <LinearLayout 22 style="@style/SyncBottomContainer" > 23 24 <LinearLayout 25 style="@style/SyncBottom" > 26 ../../src/main/res/layout/sync_send_tab.xml:42: This LinearLayout layout or its LinearLayout parent is useless 39 <LinearLayout 40 style="@style/SyncBottomContainer" > 41 42 <LinearLayout 43 style="@style/SyncBottom" > 44 ../../src/main/res/layout/sync_setup.xml:87: This LinearLayout layout or its LinearLayout parent is useless 84 <LinearLayout 85 style="@style/SyncBottomContainer" > 86 87 <LinearLayout 88 style="@style/SyncBottom" 89 android:orientation="horizontal" > ../../src/main/res/layout/sync_setup_failure.xml:32: This LinearLayout layout or its LinearLayout parent is useless 29 <LinearLayout 30 style="@style/SyncBottomContainer" > 31 32 <LinearLayout 33 style="@style/SyncBottom" > 34 ../../src/main/res/layout/sync_setup_jpake_waiting.xml:37: This LinearLayout layout or its LinearLayout parent is useless 34 <LinearLayout 35 style="@style/SyncBottomContainer"> 36 37 <LinearLayout 38 style="@style/SyncBottom"> 39 ../../src/main/res/layout/sync_setup_nointernet.xml:25: This LinearLayout layout or its LinearLayout parent is useless 22 <LinearLayout 23 style="@style/SyncBottomContainer" > 24 25 <LinearLayout 26 style="@style/SyncBottom" > 27 ../../src/main/res/layout/sync_setup_pair.xml:70: This LinearLayout layout or its LinearLayout parent is useless 67 <LinearLayout 68 style="@style/SyncBottomContainer" > 69 70 <LinearLayout 71 style="@style/SyncBottom" 72 android:orientation="horizontal" > ../../src/main/res/layout/sync_setup_success.xml:28: This LinearLayout layout or its LinearLayout parent is useless 25 <LinearLayout 26 style="@style/SyncBottomContainer" > 27 28 <LinearLayout 29 style="@style/SyncBottom" > 30 ../../src/main/res/layout/tab_queue_prompt.xml:16: This LinearLayout layout or its FrameLayout parent is useless; transfer the background attribute to the other view 13 android:clipChildren="false" 14 android:clipToPadding="false"> 15 16 <LinearLayout 17 android:layout_width="@dimen/tab_queue_container_width" 18 android:layout_height="wrap_content" ../../src/main/res/layout/tab_queue_toast.xml:13: This LinearLayout layout or its FrameLayout parent is possibly useless 10 android:layout_width="match_parent" 11 android:layout_height="wrap_content"> 12 13 <LinearLayout 14 android:id="@+id/toast" 15 style="@style/Toast"> Note: This issue has an associated quickfix operation in Eclipse/ADT Fix Priority: 2 / 10 Category: Performance Severity: Warning Explanation: Useless parent layout. A layout with children that has no siblings, is not a scrollview or a root layout, and does not have a background, can be removed and have its children moved directly into the parent for a flatter and more efficient layout hierarchy.
Assignee: nobody → michael.l.comella
Comment on attachment 8625536 [details] [review] github changes This was all very delicate to arrange the top and bottom bar. Have you tested this? (Or even viewed in the design mode of IJ?) I re-worked this years ago; lord knows I didn't know much about Android layout, and the state of the art of has moved on, so this is probably better, but I'd want at least a little manual testing. We're going to rip out the Sync stuff sooner rather than later, so I'm not /too/ worried. So take this r+ as a smoke test more than verification.
Attachment #8625536 - Flags: review?(nalexander) → review+
(In reply to Nick Alexander :nalexander from comment #3) > This was all very delicate to arrange the top and bottom bar. Have you > tested this? (Or even viewed in the design mode of IJ?) Looks the same in the design mode of Android Studio and I don't have an old sync account to test on device. > I re-worked this > years ago; lord knows I didn't know much about Android layout, and the state > of the art of has moved on, so this is probably better, but I'd want at > least a little manual testing. It was my understanding that the code was laid out with multiple layouts to do inheritance (e.g. one style changed on some partition of devices but the other didn't) so I just did what I've been doing for inheritance.
Comment on attachment 8625531 [details] MozReview Request: Bug 1176886 - Add UselessParent ignore to tab_queue_prompt. r=mhaigh https://reviewboard.mozilla.org/r/11841/#review10389 Ship It!
Attachment #8625531 - Flags: review?(mhaigh) → review+
Status: NEW → ASSIGNED
Component: General → Theme and Visual Design
Whiteboard: [needs upstreaming]
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
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: