Bottombar: Not detecting software navbar on CM11

Created on 20 Mar 2016  路  10Comments  路  Source: roughike/BottomBar

I'm running Cyanogenmod 12 (Android 5.1.1) on my OnePlus One and I when I went for a trial run I noticed that the library always detects the software navbar as being active. It's possible to enable it and use it instead of the hardware buttons on the device, but by default it's not active.

It might be worth noting that I have configured my hardware menu button as recent apps but as far as I've noticed no changes when I configure it as menu button.

screenshot_2016-03-20-15-51-48
screenshot_2016-03-20-15-52-00

bug

All 10 comments

The softMenuIdentifier in navBarMagic is non-zero and res.getBoolean(softMenuIdentifier) returns false. hasPermanentMenuKey also returns false.

KeyCharacterMap.deviceHasKey(KeyEvent.KEYCODE_BACK) returns true. So it might work in combination with hasPermanentMenuKey, but the issue I found (below) says that this method isn't really reliable as well.

http://stackoverflow.com/questions/14853039/how-to-tell-whether-an-android-device-has-hard-keys/14871974#14871974

What about:

int navBarIdentifier = res.getIdentifier("navigation_bar_height",
                "dimen", "android");
int navBarHeight = navBarIdentifier > 0? res.getDimensionPixelSize(navBarIdentifier) : 0;

Can you test what is the navBarHeight after running that code?

navBarHeight is 144 (48dp). Thus the resource does exist.

The hasSoftKeys from the StackOverflow issue seems to works fine. But I might be a bit hacky to just measure the window imo.

I'll test that code from StackOverflow and if it's good, I'll implement that. If we need to use hacky solutions to work, then so be it.

Thanks for reporting the issue!

Just updated the library to version _1.1.2._, try and see if this works now.

I pulled the source to test the sample app. I don't see any other source changes since I did that and the README update?

It should be there now.

Works!

Awesome!

Huge thanks for reporting, helping and testing!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lamba92 picture lamba92  路  5Comments

BlaineOmega picture BlaineOmega  路  7Comments

LiuDeng picture LiuDeng  路  5Comments

mag2007 picture mag2007  路  8Comments

yerenutku picture yerenutku  路  4Comments