Navigation bar scaling bug on 5.1.1

Post Reply
benwillcox
Posts: 205
Joined: Wed Oct 05, 2016 6:34 pm
languages_spoken: english
ODROIDs: C1+
C2
Location: United Kingdom
Has thanked: 14 times
Been thanked: 12 times
Contact:

Navigation bar scaling bug on 5.1.1

Unread post by benwillcox » Thu Oct 06, 2016 8:55 am

Hi there,
I've just reflashed my C1+ with the 5.1.1 image and think there is a bug in the scaling of the navigation bar at different DPI settings.
I have a 800x480 screen, which when running 4.4 I edited set_density.sh to use a DPI of 180 which worked nicely to make everything large on the screen as this is a 7" screen mounted in a car. This made the navigation bar a nice large size at the bottom of the screen (landscape mode), with just the back, home, and task switching icons visible (perfect!)
The same is achieved by manually running wm density 180.

But on 5.1.1 running the same command, the display scales as normal but the navigation bar is created on the right side of the screen containing no icons (it's just blank), and pressing where the icons should be does nothing. This happens at all DPI settings I have tested except down to 120, which restores the navigation bar to the bottom of the screen again. (Again only three icons which is just what I want, rather than the addition of volume, screenshot etc that is standard).

Do you have any idea why this is happening?

Thanks
Ben

User avatar
odroid
Site Admin
Posts: 33297
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 376 times
Been thanked: 449 times
Contact:

Re: Navigation bar scaling bug on 5.1.1

Unread post by odroid » Thu Oct 06, 2016 1:15 pm

I already know that only 120 dpi works.
Google changed the characteristics of the navigation bar in Android 5.1.
We really don't have any idea why Google made the strange bug.

benwillcox
Posts: 205
Joined: Wed Oct 05, 2016 6:34 pm
languages_spoken: english
ODROIDs: C1+
C2
Location: United Kingdom
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: Navigation bar scaling bug on 5.1.1

Unread post by benwillcox » Thu Oct 06, 2016 9:58 pm

Thanks for the reply, that's a shame :-(

I actually wouldn't mind the nagivation bar being on the right, but without icons it's basically broken. I need the higher DPI setting as for my application the text and icons are just too small to read from a distance.
I've also found another issue after upgrading to 5.1.1, where the display is corrupted on boot, about 50% of the time. The ANDROID boot animation flickers with lines through it and similar when the OS finishes booting, then I have to power off and on again. Could something be wrong with the HDMI resolution detection maybe? I'm using a 800x480 resolution screen and the screen is powered up at the same time as the Odroid - maybe the EDID can't be read in time and it defaults to a different resolution? I will try fixing the resolution in the boot.ini file (which I had to do with Android 4.4 anyway).
Thanks,
Ben

benwillcox
Posts: 205
Joined: Wed Oct 05, 2016 6:34 pm
languages_spoken: english
ODROIDs: C1+
C2
Location: United Kingdom
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: Navigation bar scaling bug on 5.1.1

Unread post by benwillcox » Thu Oct 06, 2016 10:42 pm

Oh it seems that the boot.ini is already set, I guess this must get done during the first boot of the system?
I also forgot to mention the other problem with 5.1.1 is that every time I boot the system spends some time with a message saying 'optimising your apps' or something like that.
Looks like I will have to revert back to 4.4.

Thanks,
Ben

benwillcox
Posts: 205
Joined: Wed Oct 05, 2016 6:34 pm
languages_spoken: english
ODROIDs: C1+
C2
Location: United Kingdom
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: Navigation bar scaling bug on 5.1.1

Unread post by benwillcox » Tue Oct 11, 2016 1:00 am

I've reverted back to Android 4.4.2 but still having some problems with the navigation bar. Previously I managed to get it working by simply editing the DPI definition for the 800x480 resolution detection within the /system/bin/set_density.sh. When it worked this was on the pre-installed SD-Card I bought through odroid.co.uk. However after overwriting this to test 5.1.1 and subsequently re-imaging my card with 4.4.2 from the official Odroid repository, changing this set_density.sh line doesn't work!

I'm rather baffled why it's not working - I can run wm density 180 from the terminal or ssh session and it works perfectly, and can run set_density.sh manually and all is fine, it just doesn't seem to run at boot.

There is a correct reference to the service in init.odroid.board.rc but just doesn't seem to get executed. Is there any way I can debug this?
At the moment I have have to install an App that automatically runs a script at startup to issue 'wm density 180', but it takes over 30 seconds for this to run so not an ideal solution.

Many thanks,
Ben

benwillcox
Posts: 205
Joined: Wed Oct 05, 2016 6:34 pm
languages_spoken: english
ODROIDs: C1+
C2
Location: United Kingdom
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: Navigation bar scaling bug on 5.1.1

Unread post by benwillcox » Wed Oct 12, 2016 5:11 am

I think I'm talking to myself here, but I've fixed the problem. Needed to add a 'sleep 2' after the 'wm density 180' line in set_density.sh then repeat the 'wm density 180' command. Don't know why, but it works now.

Ben

User avatar
rooted
Posts: 7259
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 452 times
Been thanked: 127 times
Contact:

Re: Navigation bar scaling bug on 5.1.1

Unread post by rooted » Wed Oct 12, 2016 7:18 am

benwillcox wrote:I think I'm talking to myself here, but I've fixed the problem. Needed to add a 'sleep 2' after the 'wm density 180' line in set_density.sh then repeat the 'wm density 180' command. Don't know why, but it works now.

Ben
It's good to put your thoughts and steps somewhere others can see, helps people with the same issue ;)

Glad you got it sorted, too bad about lollipop though.

benwillcox
Posts: 205
Joined: Wed Oct 05, 2016 6:34 pm
languages_spoken: english
ODROIDs: C1+
C2
Location: United Kingdom
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: Navigation bar scaling bug on 5.1.1

Unread post by benwillcox » Mon Oct 31, 2016 2:03 am

Just to pick this up again, I recently upgraded to a C2, so have to run Android 5.1. I have the same problem of course, but I found a post on another forum about it (last post by Martin Fuzzey): https://community.nxp.com/thread/384348#comment-831065 this last post shows a patch which fixes the problem, due to the vertical navbar having an incorrect horizontal layout.
Odroid, is there a possibility this could be tested and if ok merged into a new release?

Thanks!
Ben

User avatar
odroid
Site Admin
Posts: 33297
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 376 times
Been thanked: 449 times
Contact:

Re: Navigation bar scaling bug on 5.1.1

Unread post by odroid » Mon Oct 31, 2016 10:24 am

We will look into the patch.

User avatar
odroid
Site Admin
Posts: 33297
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 376 times
Been thanked: 449 times
Contact:

Re: Navigation bar scaling bug on 5.1.1

Unread post by odroid » Tue Nov 01, 2016 2:23 pm

The patch doesn't help.
The navigation bar appears only when the DPI is 120 or lower.

benwillcox
Posts: 205
Joined: Wed Oct 05, 2016 6:34 pm
languages_spoken: english
ODROIDs: C1+
C2
Location: United Kingdom
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: Navigation bar scaling bug on 5.1.1

Unread post by benwillcox » Tue Nov 01, 2016 4:50 pm

Hmm, that is a shame as this is quite a big problem for me.

Could you try the suggestion to remove this line instead:

---------------
// Allow the navigation bar to move on small devices (phones).
1194 mNavigationBarCanMove = shortSizeDp < 600;
---------------

to stop the navigation bar moving to the right?

Ben

benwillcox
Posts: 205
Joined: Wed Oct 05, 2016 6:34 pm
languages_spoken: english
ODROIDs: C1+
C2
Location: United Kingdom
Has thanked: 14 times
Been thanked: 12 times
Contact:

Re: Navigation bar scaling bug on 5.1.1

Unread post by benwillcox » Thu Nov 03, 2016 10:41 pm

Hi, I compiled the source code myself and tested commenting out that line. It solved the problem and means that the navigation bar remains at the bottom and functional for all DPI settings.
I have also posted about this in the C2 Android forums here http://forum.odroid.com/viewtopic.php?f=137&t=24294 and will continue discussion there. I wonder if you would consider making this change to your standard builds?

Thanks,
Ben

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 3 guests