Closed Bug 876938 Opened 8 years ago Closed 8 years ago

MenuItem should handle closing the menu

Categories

(Firefox for Android :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 24

People

(Reporter: sriram, Assigned: sriram)

References

Details

Attachments

(2 files)

Bug 869123 added a new type of menu item view - MenuItemActionView -- that can be used for ActionProvider based views. Since these views are unaware of the menu they are associated with, they cannot close the menu themselves. Hence a OnTargetSelectedListener interface was exposed to do cleanups when either default activity or an activity from the list was selected.

Since this feels a roundabout way to do it, it would be better if the MenuItem, the logical entity, can handle the cleanup when a share app is selected.
Blocks: 869123
Attached patch Patch: May beSplinter Review
This is one option. MenuItem attaches itself as a listener to know when a share-item was selected and does the cleanup.
Assignee: nobody → sriram
Attachment #755775 - Flags: review?(wjohnston)
Attached patch Patch: May beSplinter Review
I set the onTargetSelectedListener whenever the provider changes.
Attachment #755777 - Flags: review?(wjohnston)
Comment on attachment 755777 [details] [diff] [review]
Patch: May be

Review of attachment 755777 [details] [diff] [review]:
-----------------------------------------------------------------

I guess I like this one since it probably happens less often.
Attachment #755777 - Flags: review?(wjohnston) → review+
Attachment #755775 - Flags: review?(wjohnston)
https://hg.mozilla.org/mozilla-central/rev/d94a84a5a0ac
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 24
You need to log in before you can comment on or make changes to this bug.