Closed Bug 1140674 Opened 10 years ago Closed 9 years ago

Remove extra LinearLayout view in doorhanger

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: liuche, Unassigned, Mentored)

References

Details

(Whiteboard: [good first bug])

Bug 1137921 introduces a shadow 9-patch, but in anchored_popup_bg, mcomella suggests removing the extra parent view [1]. We can do this, but because the corners become unrounded, it needs to be replaced with a layer-list that has the dropshadow, and then a doorhanger <shape> with rounded corners [2]. The child views should then be set to color:transparent.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1137921#c17
[2] http://stackoverflow.com/questions/21000041/it-is-possible-to-use-a-shape-drawables-for-round-corners-and-a-9-patch-image-fo
I had a question on this bug since I was working on the anchored_popup.xml from Bug 1146735. 

Since we are now using a RoundedCornerLayout, wouldn't it be safe to remove the extra parent view without the need for a layer-list?
Flags: needinfo?(liuche)
No, we still need to have two layered views, one for shadow and one for the popup. RoundedCornerLayout doesn't take into account the shadow, which it would only be able to do if the background was actually a 9-patch image (but we removed that because hand-maintaining a shadow is much more annoying). One thing that I was considering, however, was replacing the whole thing with CardView from the support library, which handles the shadow, rounded corners, and also anchoring/positioning for long doorhangers (bug 1180597).
Flags: needinfo?(liuche)
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(liuche)
Resolution: --- → INVALID
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.