Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
None
-
Android
-
-
3b577dfe798bf5065a2bba4d7095709454aa709c
Description
Short version:
Qt Quick Controls need a way to hide the native ActionBar and show the options menu aligned to a non-native ActionBar.
Long version:
In Qt Quick Controls, ToolBar is an ordinary item that can have arbitrary content. There's no way for us to transfer/map the ToolBar contents to a native ActionBar. Therefore Qt Quick Controls want to hide the native ActionBar and let ToolBar draw it. This way applications can have a ToolBar with arbitrary content (such as search fields, progress bars and whatsoever), which is very common in native Android applications.
Hiding the native ActionBar is of course not free of problems. Hiding it also means that the built-in options menu doesn't show up in the desired position. Since there's no visible ActionBar, Activity::openOptionsMenu() pops up the options menu in the top left corner. Notice that ContextMenu is not usable for this purpose either, since it gets shown in the middle of the screen and dims the background => visually quite different than what the options menu is supposed to look like.
Proposal:
PopupMenu looks visually similar (same?) than options menu and it can be anchored to a view, so perhaps we could use that when the native ActionBar is hidden? The anchored view could be possibly a temporary view (like they do on iOS, I heard) so it might be possible to position PopupMenu anywhere we want.
Attachments
Issue Links
- is required for
-
QTBUG-35081 No native controls on Qt 5.2 for Android, not in widgets nor in quick application
- Closed
For Gerrit Dashboard: QTBUG-39736 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
94416,8 | Use PopupMenu when possible. | 5.4 | qt/qtbase | Status: MERGED | +2 | 0 |