Kodi Community Forum
auto hide/show lower nav bar. - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+---- Forum: Android Development (https://forum.kodi.tv/forumdisplay.php?fid=184)
+---- Thread: auto hide/show lower nav bar. (/showthread.php?tid=152232)

Pages: 1 2 3 4 5 6 7 8 9 10


auto hide/show lower nav bar. - davilla - 2013-01-15

Ok, seems several players know how to do this, we should too. So here's a bounty. you get your name listed in the commit Smile
The idea is hide the nav bar when we launch so we playback in the full screen. Bonus points for audio show when someone touches near the bottom Smile

Gentleman, start your google search engines.


EDIT:
This issue is close to being resolve but bugs are being sorted out and the code cleaned up.
See -> https://github.com/xbmc/xbmc/pull/2091


RE: auto hide/show lower nav bar. - Koying - 2013-01-15

Hehe, was on my TODO to have a look after seeing some player do this Wink


RE: auto hide/show lower nav bar. - Koying - 2013-01-15

I suppose you mean the ICS+ bar, BTW. It's different than the GB one, I think.


RE: auto hide/show lower nav bar. - kemonine96 - 2013-01-15

I looked into this awhile ago (back in August) with TheUni and I confirmed hiding the status/button bars was working fine under 2.3, but it was broken on 3.0+. The fun part is the 3.x naming is different than 4.0+ if memory serves.

I managed to find some bits that may help on 4.0+ in my "things to look at again":

Code:
in onConfigChanged

+  AConfiguration *config = NULL //AConfiguration_new();
+  AConfiguration_fromAssetManager(config, m_activity->assetManager);
+  AConfiguration_setNavHidden(config, ACONFIGURATION_NAVHIDDEN_YES);
+  AConfiguration_setKeysHidden(config, ACONFIGURATION_KEYSHIDDEN_YES);



RE: auto hide/show lower nav bar. - coredalae - 2013-01-15

mjea, guess he means both the button bar and the notification bar in 4.0.

Great work btw so far, first build that got full hd to play on my nexus 7!


RE: auto hide/show lower nav bar. - davilla - 2013-01-15

in onConfigChanged ? we have no onConfigChanged in xbmc code Smile




RE: auto hide/show lower nav bar. - kemonine96 - 2013-01-15

(2013-01-15, 23:23)davilla Wrote: in onConfigChanged ? we have no onConfigChanged in xbmc code Smile

It was shorthand. Method that I believe my notes refer to is

xbmc/android/activity/XBMCApp.cpp:onConfigurationChanged()


RE: auto hide/show lower nav bar. - davilla - 2013-01-15

hehe, onConfigurationChanged never gets called


RE: auto hide/show lower nav bar. - kemonine96 - 2013-01-16

(2013-01-15, 23:28)davilla Wrote: hehe, onConfigurationChanged never gets called

That explains some of the problem previously. Where would you add the code? StartActivty / onCreateWindow / other?


RE: auto hide/show lower nav bar. - davilla - 2013-01-16

I tried all over, OnResume was last, it just ignored me Smile Also I did a google search on "ACONFIGURATION_NAVHIDDEN_YES", 68 results and all were includes. Seems no one uses this at all Smile


RE: auto hide/show lower nav bar. - davilla - 2013-01-16

Oh I should also say, nexus7 running jb.



RE: auto hide/show lower nav bar. - kemonine96 - 2013-01-16

(2013-01-16, 01:07)davilla Wrote: I tried all over, OnResume was last, it just ignored me Smile Also I did a google search on "ACONFIGURATION_NAVHIDDEN_YES", 68 results and all were includes. Seems no one uses this at all Smile

Well then... That leaves a JNI approach...


RE: auto hide/show lower nav bar. - manxam - 2013-01-16

Isn't it just a call to view.SYSTEM_UI_FLAG_HIDE_NAVIGATION during XBMC start and then onTouchEvent set View.SYSTEM_UI_FLAG_VISIBLE again?

Granted, I haven't taken a look at XBMC's android code to see what your doing and my android-fu is quite weak Smile



RE: auto hide/show lower nav bar. - kemonine96 - 2013-01-16

That is what I meant by a JNI approach, but looking at the AndroidManifest.xml it looks like that approach may not work. The manifest already has the android:theme setup for full screen + no bars.

@davilla Have you tried the SYSTEM_UI_FLAG_* approach?


RE: auto hide/show lower nav bar. - davilla - 2013-01-16

Not yet, next on the list I guess. I can't believe this is something no one else has done. Must be some deep dark android secret and we need the magic handshake to solve it. Ok game on, we will find it and expose it for all to see and use in their own code Smile