Closed Bug 1086221 Opened 10 years ago Closed 10 years ago

Increase close button hit area in tabs panel

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 36

People

(Reporter: mhaigh, Assigned: mhaigh)

References

Details

Attachments

(1 file, 1 obsolete file)

In the new tab grid view we need to make the close button hit area bigger as it's currently way too small.
This feels better - do you think posting the runnable is overkill?
Attachment #8508595 - Flags: feedback?(lucasr.at.mozilla)
Let's see if the hit area is big enough with the new cell layout.
Comment on attachment 8508595 [details] [diff] [review] Increase close button hit area in tabs panel Review of attachment 8508595 [details] [diff] [review]: ----------------------------------------------------------------- Let's use OnPreDrawListener instead. ::: mobile/android/base/ThumbnailHelper.java @@ +31,4 @@ > public final class ThumbnailHelper { > private static final String LOGTAG = "GeckoThumbnailHelper"; > > + public static final float THUMBNAIL_ASPECT_RATIO = 1.5f;//0.571f; // this is a 4:7 ratio (as per UX decision) Unrelated? ::: mobile/android/base/tabs/TabsLayoutItemView.java @@ +94,5 @@ > + final Rect r = new Rect(); > + mCloseButton.getHitRect(r); > + r.left -= 20; > + r.bottom += 20; > + setTouchDelegate(new TouchDelegate(r, mCloseButton)); Using OnPreDrawListener is a more robust approach. Something like: getViewTreeObserver().addOnPreDrawListener(new OnPreDrawListener() { @Override public boolean onPreDraw() { getViewTreeObserver().removeOnPreDrawListener(this); final Rect r = new Rect(); mCloseButton.getHitRect(r); r.left -= 20; r.bottom += 20; setTouchDelegate(new TouchDelegate(r, mCloseButton)); } });
Attachment #8508595 - Flags: feedback?(lucasr.at.mozilla)
Attachment #8508595 - Attachment is obsolete: true
Attachment #8516685 - Flags: review?(lucasr.at.mozilla)
Comment on attachment 8516685 [details] [diff] [review] Increase close button hit area in tabs panel Review of attachment 8516685 [details] [diff] [review]: ----------------------------------------------------------------- Great.
Attachment #8516685 - Flags: review?(lucasr.at.mozilla) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 36
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: