[Android-development] Forcing native menubar to show

maitai at virtual-winds.org maitai at virtual-winds.org
Mon Oct 6 11:15:55 CEST 2014


Le 06-10-2014 10:13, Eskil Abrahamsen Blomfeldt a écrit :
> On 10/06/2014 10:10 AM, maitai at virtual-winds.org wrote:
>> Hi Eskil, thanks for your reply
>> 
>> A summary of what happened:
>> 
>> With target=api level 15 (the default)
>> 
>> On a device with a physical menu button running android 4.4.2, no 
>> problem
>> On a device without any physical button running android 4.0.4, the 
>> menu icon (the 3 vertical dots) does not show in android statusbar.
> 
> On the second device, is there an action bar with an overflow button
> which gives you the menu? Because that's the intended way it should
> work in Android 3.0 and up. The overflow button with the vertical dots
> in the system navigation bar is a compatibility feature and will look
> ugly on some devices (we had reports of this for the tech preview in
> Qt 5.1 days, where we always targeted android 10 by default).
> 

No, there is no such overflow button. I couldn't find a way to show the 
menu with api level 15 selected.

>> 
>> I have yet another issue: One of my user has a Samsung Galaxy 
>> S5/Android 4.4.2. On this device, the menu button is physical, but the 
>> user has to press long on it, otherwise he gets the tasks window. This 
>> is not convenient at all for him, as you can understand. Maybe his 
>> device is replying "true" when asked if it has a physical button, and 
>> therefore qt decides not to show the menu button (and even the 
>> statusbar)? I have tried to target level 10, 15 and 19 for this 
>> device... no way to get a better menu button.
> 
> If there is a physical menu button, then Qt should use this. Do other
> applications on his device show software buttons for the menus in
> addition to the physical button?
> 

Yes. For instance maps, gmail, deezer, outlook, etc. The 3 dots does not 
appear always at the same place and with the same look but they are 
there and the user does not have to know the press-long trick. I join 
some screenshots he gave me. AFAIK the button appears in these 
applications regardless of having physical buttons or not, but I might 
be wrong. The physical menu button seems to do exactly the same thing as 
the application 3 dots icon.

>> 
>> Ideally I would like to target level 15, and to be able to call the 
>> native menu myself from inside the application. That way I could have 
>> a menu button somewhere in my app, plus I could launch the native menu 
>> on some user action (for instance a long-press on a QGraphicsItem).
> 
> That should be possible, yes :) But if you don't want the action bar
> or react to the physical menu button, then you have to disable the
> main window's menu bar and just use your own pop-up instead.
> 

Of course I have tried that, the problem is that it doesn't look native 
at all, and plain ugly in many cases...


Philippe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot_2014-10-06-10-49-29.png
Type: image/png
Size: 92211 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/android-development/attachments/20141006/88d5a609/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot_2014-10-06-10-46-53.jpeg
Type: image/jpeg
Size: 208969 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/android-development/attachments/20141006/88d5a609/attachment.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot_2014-10-06-10-47-23.jpeg
Type: image/jpeg
Size: 64183 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/android-development/attachments/20141006/88d5a609/attachment-0001.jpeg>


More information about the Android-development mailing list