Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android notification bar covers part of content #904

Closed
mvglasow opened this issue Oct 8, 2019 · 9 comments
Closed

Android notification bar covers part of content #904

mvglasow opened this issue Oct 8, 2019 · 9 comments

Comments

@mvglasow
Copy link
Contributor

mvglasow commented Oct 8, 2019

Steps to reproduce

  1. Launch Navit on Android.
  2. Open the internal GUI menu, or choose “Set map location” from the Android menu, or set a destination.

Expected result

Content is placed in such a way that it is not obstructed by the notification bar.

Actual result

Content is drawn behind the notification bar and obstructed by it. This occurs in all views: navigation, internal GUI menu as well as file browser.

Software environment

Navit ef43e78, Android 4.4.4 (Cyanogenmod on Nexus S).

Additional information

  • Navigation bar might also be affected (could not test this as the device I use has hardware navigation buttons).
  • The device/distro combination tested does not support translucent/transparent/… system bars: the notification bar is always black and opaque.
  • This used to work properly at least after the changes I made in February 2019 and IIRC still did until early/mid-August. I see that d18dec5 made some extensive changes regarding size calculations (which included getting rid of some hacks I had introduced to work around what seemed to be a bug in every version of Android I had tested), though I would have to bisect to find out if that caused the errors.

@jandegr any chance you can take a look at this?

@jandegr
Copy link
Contributor

jandegr commented Oct 9, 2019

Hi,
The issue with other activities (filebrowser, search, map download...) crawling behind the statusbar was reproducable on regular Android and is fixed in #890.
I should and could have noticed this before, thx for reporting.

The reported isssue with the mapview (gui internal appears on the mapview as well) was not reproducable on regular Android so far,

@mvglasow
Copy link
Contributor Author

Thanks for the update, didn’t realize there was still something in the queue.

Might be related to the changes in NavitGraphics.NavitView#onApplyWindowInsets(): the Android versions I tested reported an incorrect top inset here. I see #877 also removes the call to the superclass method, which I had placed at the end. Looking at the code again, I realize we might want to call the superclass method first, and see if that modifies the insets. Just a suspicion, though—I’ll test and report back.

@mvglasow
Copy link
Contributor Author

mvglasow commented Oct 10, 2019

Just tested #890 and it seems to fix the behavior on the Nexus S. I also tested with LineageOS 15.1 on a OnePlus One (including split screen), which looks OK as well.

Btw, does #877 change the default path in which Navit looks for a custom navit.xml and/or map data?

@jandegr
Copy link
Contributor

jandegr commented Oct 10, 2019

Hi,
It would rather be 877 that changes the default path.
The thought is, for users without special needs all goes into the path that every app can use without permissions. Those users are not bothered with having to give permission for storage. If such a user downloaded a map from the server and later uninstalls the app, then all incl. the maps are removed as it is supposed to do.
Users who want to change paths are supposed to know what they are doing, and know they have to give permission in the app settings on their own, at least on an sdk that requires this. On older SDK's the permission is given at first install. Maps in these custom paths are not removed in case of an uninstall. When upgrading an existing install from before these changes, all settings are preserved and no special actions are needed.

@mvglasow
Copy link
Contributor Author

My bad, I meant #877 of course. So where would I drop my custom navit.xml now? /sdcard/navit doesn’t seem to work any more.

@gefin
Copy link
Contributor

gefin commented Oct 11, 2019

@mvglasow Just go into Apps->Navit and add there storage permission.
After this you can use sdcard/navit.

@jandegr
Copy link
Contributor

jandegr commented Oct 11, 2019

Just did a test

  • fresh install on a device that already has xml and a binfile in mnt/sdcard/navit
  • with the filebrowseractivity select mnt/sdcard (not the existing navit subdir)
  • restart navit
  • now both the binfile and the xml are used by navit

it is always handy to watch the output of https://github.com/navit-gps/navit/blob/trunk/navit/android/src/org/navitproject/navit/Navit.java#L301

This was tested on a jellybean device but I am confident this will still work the same on devices where it has worked before.
On the most recent SDK's the path mnt/sdcard can't work anymore, but before #877 that path did not work on those devices either.

@mvglasow
Copy link
Contributor Author

I see that this is a bigger one; I’ve put it up for discussion in #907 to avoid this issue going off-topic.

@mvglasow
Copy link
Contributor Author

Since #890 is merged, I am closing this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants