Closed Bug 1177244 Opened 5 years ago Closed 5 years ago

[Linter: MergeRootFrame] Use <merge> instead of <FrameLayout> where applicable

Categories

(Firefox for Android :: General, defect)

All
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 41
Tracking Status
firefox41 --- fixed

People

(Reporter: mcomella, Assigned: mcomella)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

via android lint:

MergeRootFrame: FrameLayout can be replaced with <merge> tag
../../src/main/res/layout/overlay_share_dialog.xml:8: This <FrameLayout> can be replaced with a <merge> tag

   5    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
   6 
   7 <!-- Serves to position the content on the screen (bottom, centered) and provide the drop-shadow -->
   8 <FrameLayout
   9     xmlns:android="http://schemas.android.com/apk/res/android"
  10     xmlns:gecko="http://schemas.android.com/apk/res-auto"

../../src/main/res/layout/tab_queue_prompt.xml:7: This <FrameLayout> can be replaced with a <merge> tag

   4    - License, v. 2.0. If a copy of the MPL was not distributed with this
   5    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
   6 
   7 <FrameLayout
   8     xmlns:android="http://schemas.android.com/apk/res/android"
   9     xmlns:tools="http://schemas.android.com/tools"

Priority: 4 / 10
Category: Performance
Severity: Warning
Explanation: FrameLayout can be replaced with <merge> tag.
If a <FrameLayout> is the root of a layout and does not provide background or padding etc, it can often be replaced with a <merge> tag which is slightly more efficient. Note that this depends on context, so make sure you understand how the <merge> tag works before proceeding.

More info: http://android-developers.blogspot.com/2009/03/android-layout-tricks-3-optimize-by.html
Attachment #8625934 - Flags: review?(mhaigh) → review+
Comment on attachment 8625934 [details]
MozReview Request: Bug 1177244 - Move share dialog to merge tag. r=mhaigh

https://reviewboard.mozilla.org/r/11949/#review10527
Comment on attachment 8625935 [details]
MozReview Request: Bug 1177244 - Move tab queue prompt to merge tag. r=mhaigh

https://reviewboard.mozilla.org/r/11951/#review10529

Ship It!
Attachment #8625935 - Flags: review?(mhaigh) → review+
You need to log in before you can comment on or make changes to this bug.