Closed Bug 1137921 Opened 7 years ago Closed 7 years ago
Use 9-patch for View shadows
271.25 KB, image/png
5.51 KB, application/zip
183.93 KB, image/png
39 bytes, text/x-review-board-request
No description provided.
Let's try these.
Note from discussion w/ liuche: we should be careful about how much overdraw we perform by using 9-patches, rather than just drawing where we explicitly need a shadow.
Anthony, can you give me these 9-patches with a ring of 1px white around the edge? The transparency at the edges is giving me problems building. Also, if it's possible, we should ideally make the center transparent as well!
Sent files via IRC
Leaving a note here we might want to explore using Android L's "elevation value" for some of these shadows
Note of ratios: MDPI: 1 HDPI: 1.5 XHDPI: 2 XXHDPI: 3
@mcomella: I tried out the transparent centers, and it doesn't look like it makes any difference in overdraw, so we'll just drop that.
(In reply to Chenxia Liu [:liuche] from comment #8) > Created attachment 8571697 [details] > Screenshot: overdraw > > @mcomella: I tried out the transparent centers, and it doesn't look like it > makes any difference in overdraw, so we'll just drop that. I see some areas of RED in that screenshot. Might be worth filing followup bugs.
Anthony, what do you think?
Shadow looks good! Doorhanger position needs to move up a dp or two I reckon but that's not in this bug :)
Summary: Experimental 9-patch for shadow → Use 9-patch for View shadows
/r/4741 - Bug 1137921 - Use 9-patch for View shadows. r=margaret Pull down this commit: hg pull review -r d75b0fedc95a3b486bb8228a335fc365ceb6a1c7
Still have some tweaks to make - figuring out only some of the corners are rounded, improving the shadow for antlam.
Attachment #8573358 - Flags: review?(margaret.leibovic)
Comment on attachment 8573358 [details] MozReview Request: bz://1137921/liuche /r/4741 - Bug 1137921 - Use 9-patch for View shadows. r=margaret Pull down this commit: hg pull review -r fcd00525a637b6656b0253df108687fa029db5a9
Comment on attachment 8573358 [details] MozReview Request: bz://1137921/liuche https://reviewboard.mozilla.org/r/4739/#review3915 This looks reasonable to me, but I'd also like mcomella to take a look because he has more context than me around these shadows.
Attachment #8573358 - Flags: review?(margaret.leibovic) → review+
Comment on attachment 8573358 [details] MozReview Request: bz://1137921/liuche https://reviewboard.mozilla.org/r/4739/#review3997 (Apparently I can't comment on specific lines) Regarding the shadow, it appears to add a layer of overdraw. However, given that the alternative approach I can think of (drawing the shadow by hand in onDraw) adds a lot of complexity (especially with rounded corners), this seems like a good solution if there are no noticeable perf regressions. On a different note, any reason to have <LinearLayout> <ScrollView> <LinearLayout>? Why not <ScrollView> <LinearLayout>?
Attachment #8573358 - Flags: review?(michael.l.comella) → review+
Corners become sharp (instead of rounded) when scrolling up. Filed follow-up bug 1140674.
Target Milestone: --- → Firefox 39
Attachment #8589613 - Attachment is obsolete: true
Attachment #8589614 - Attachment is obsolete: true
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.