Hi, I’m using cocos2d-x v3.2 for my game on Android.
While the game is running, if player hides the system navigation bar, then the game view is dropped down by a distance equals to the hidden navbar.
And hence, the touch position Y becomes incorrect, player need to touch above a button in game to actually get the button.
What I want is to keep game view stay inact on hiding/showing navbar, so that touch position is handled correctly.
Would you please help?
Some notes:
- Navbar is the bottom bar that contains Back, Home, AppDrawer/Menu buttons on Android 4.x devices
- To hide the navbar on rooted device:
adb shell service call activity 42 s16 com.android.systemui
- To get it show back:
adb shell am startservice -n com.android.systemui/.SystemUIService
- Some custom ROMs add a button to navbar to show/hide navbar anytime.
Thanks a lot, guys