[Android-development] android: android actionbar appears and never hides when calling openOptionsMenu

maitai maitai at virtual-winds.org
Mon Apr 25 08:58:59 CEST 2016


Hello again,

After much digging in qt sources I found a workaround for that and 
succeeded to hide the actionBar. I opened QTBUG-52964 for that, see for 
more explanations.

Regards
Philippe

Le 24-04-2016 19:36, maitai a écrit :
> Hello,
> 
> Using Qt 5.6 (widget), I have a tablet android 5.1.1 without any
> physical buttons (Danew Dslide 1014). In my app I have a button that
> triggers openOptionsMenu(). When the menu appears, strangely the
> android action bar appears over the application, at the bottom. The
> problem is that when the options menu gets closed the actionBar stays
> there and there is no way to get it hidden, apart from sending the app
> to the background and showing it again. To make things worst, Qt
> (mainWindow) doesn't resize to make room for the actionBar, so some
> elements are under it and not accessible anymore after that.
> 
> I set the theme to Theme_Holo_NoActionBar_Fullscreen before onCreate,
> using super.setTheme(), QT_ANDROID_THEMES and
> QT_ANDROID_DEFAULT_THEME.
> 
> All this is working fine on devices with a physical home button (the 
> majority).
> 
> I've spend the last 2 days trying to close this actionBar from my
> activity (derived from QtActivity), no luck. getActionBar() is
> returning NULL, and trying
> Class.forName("android.app.ActionBar").getMethod("hide").invoke(getActionBar());
> doesn't work either.
> 
> Any help would be really welcomed
> 
> Regards,
> Philippe Lelong
> _______________________________________________
> 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