[Android-development] Forcing native menubar to show

maitai at virtual-winds.org maitai at virtual-winds.org
Mon Oct 6 10:10:13 CEST 2014


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.

With target=api level 10

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 
button is there in Android statusbar. The button was doing nothing until 
I changed ministro to "testing", i.e. 5.3.2. I think it was 5.3.0 before 
that. After I switched to 5.3.2 all was ok.

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.

Then I thought that maybe the theme is an issue (I use 
@android:style/Theme.Holo.NoActionBar.Fullscreen), so I had my user 
trying with @android:style/Theme.Holo and also 
@android:style/DeviceDefault. The result is worst: not only the status 
bar is not shown, but the long-press on the physical button does not 
trigger the menu anymore, but instead shows the title bar, and the user 
has no access to the menu at all. Rather confusing...

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).

Thanks
Philippe.

Le 06-10-2014 08:57, Eskil Abrahamsen Blomfeldt a écrit :
> On 10/05/2014 07:44 AM, maitai at virtual-winds.org wrote:
>> Finally found this:
>> https://bugreports.qt-project.org/browse/QTBUG-32002
>> 
>> And by tagetting api level 10 AND making sure that qt-5.3.2 is used by
>> ministro I get a working menu button on a device without physical 
>> keys.
>> 
>> Now the question is what do I loose by setting the target api to 10
>> instead of for instance 19?
> 
> Setting the target API will mainly enable compatibility features such 
> as
> the overflow button in the navigation bar. I don't have the full
> overview of what the compatibility features with API 10 are, but I 
> think
> the overflow button versus action bar is one of the main ones. On your
> API level 15 device, Qt should actually use the action bar instead by
> default (it was added in API 11). Is that not showing in your
> application? That is perhaps the actual bug here.
> 
> By the way: Which Qt versions were you using when the menu button 
> showed
> but did not work?
> 
> -- Eskil
> 
> _______________________________________________
> Android-development mailing list
> Android-development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/android-development




More information about the Android-development mailing list