Closed
Bug 1027139
Opened 11 years ago
Closed 11 years ago
Fix ArrowPopup arrow positioning
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 33
People
(Reporter: bnicholson, Assigned: bnicholson)
References
Details
Attachments
(1 file)
8.35 KB,
patch
|
Margaret
:
review+
|
Details | Diff | Splinter Review |
The plan is to extend ArrowPopup to make the hint popup for the reader mode icon (bug 1011712). From [1]: "This assumes that anchor is not too close to the right side of the screen."
Guess which side of the screen the reader mode icon is on!
[1] http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/widget/ArrowPopup.java#114
Assignee | ||
Comment 1•11 years ago
|
||
Dynamically sets the arrow position after the popup window is positioned. Wish this didn't require a custom view for such a trivial use, but View.OnLayoutChangeListener wasn't introduced until API 11.
Attachment #8442551 -
Flags: review?(margaret.leibovic)
Comment 2•11 years ago
|
||
Comment on attachment 8442551 [details] [diff] [review]
Fix ArrowPopup positioning for anchors on right side of screen
Review of attachment 8442551 [details] [diff] [review]:
-----------------------------------------------------------------
This positioning code is always so tricky, but this looks good. Be sure to test on tablets and phones.
::: mobile/android/base/widget/ArrowPopup.java
@@ +63,3 @@
> setContentView(layout);
>
> + layout.mListener = new ArrowPopupLayout.OnSizeChangedListener() {
You can set this even though it's a private member? I guess that works because ArrowPopupLayout is an inner class?
@@ +138,5 @@
> return;
> }
>
> + if (isShowing()) {
> + update(mAnchor, -mArrowWidth, -mYOffset, -1, -1);
Add a comment explaining that -mArrowWidth is just being used here to create some space to the left of the arrow (the fact that it's the arrow width confused me, since this doesn't actually have to do with the arrow).
Attachment #8442551 -
Flags: review?(margaret.leibovic) → review+
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to :Margaret Leibovic from comment #2)
> You can set this even though it's a private member? I guess that works
> because ArrowPopupLayout is an inner class?
Yep.
> Add a comment explaining that -mArrowWidth is just being used here to create
> some space to the left of the arrow (the fact that it's the arrow width
> confused me, since this doesn't actually have to do with the arrow).
Done.
https://hg.mozilla.org/integration/fx-team/rev/82142792b685
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 33
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•