kiwix / kiwix-xulrunner

[ARCHIVED] Legacy Kiwix desktop solution for Windows/macOS/Linux
https://download.kiwix.org/release/kiwix-xulrunner/
GNU General Public License v3.0
111 stars 28 forks source link

Collapse toolbar when scrolling down (work in progress) #440

Closed GEOFBOT closed 7 years ago

GEOFBOT commented 7 years ago

Issue #359. Somewhat based on org.wikipedia.page.ViewHideHandler (under the Apache 2.0 license).

GEOFBOT commented 7 years ago

The main visual glitching (primarily flickering) happens when the WebView has reached the top, but the toolbar is not visible. Dragging the WebView down should shift the WebView down while showing the toolbar, but since the toolbar moving functionality depends on the scroll position of the WebView, moving the WebView while scrolling is probably what's causing the issue.

Another solution might be to resize the WebView without scrolling within it, or to use a WebView such as (https://github.com/takahirom/webview-in-coordinatorlayout). I would prefer the latter because it would be cleaner and easier to maintain (we wouldn't have to worry about the toolbar scrolling logic) but it would require some reorganization of the main app layout.

mhutti1 commented 7 years ago

@GEOFBOT I have fixed the majority of the visual glitches here https://github.com/mhutti1/kiwix/commit/61630cbd35d85ddc17d11d37896cafb018e8d96d You should try with my changes and then fix the remaining glitches that I can see such as opening a new tab or using the left/right draws of the app.

GEOFBOT commented 7 years ago

Some other issues I noticed:

I'll work on fixing these ASAP.

mhutti1 commented 7 years ago

@GEOFBOT New tabs don't display properly either.

mhutti1 commented 7 years ago

@GEOFBOT This is looking good. The only remaining but that I can see is the jump right issue.

mhutti1 commented 7 years ago

@GEOFBOT I have managed to fix all the major issues with fb51845bae9416af1c83c557859c5c0022f8a0ad so I have merged. Thanks again for your perseverance. 🥇