Closed davimount closed 8 years ago
What does this function actually do?
The user can now choose to always hide the omnibox on scrolldown. I guessed that if an user is scrolling down the page, he's actually looking for more content and may want a real fullscreen without URL bar, no matter if the omnibar is on top or bottom. By default it's disabled, so the actual behaviour is not affected, which is:
on scroll down
if omni is on top
hide omni
else if omni on bottom
show omni
on scroll up
if omni is on top
show omni
else if omni on bottom
hide omni
While enabled, it will be:
on scroll down
hide omni
on scroll up
show omni
And the user scrolling down can have more space while reading even if the omnibar is on bottom. I hope I explained myself.
Oh yeah this would be good, is it applicable to both bot and top?
Not yet, but it's pretty easy to do. As I don't have much time today, I can add it later this week.
TODO: fix the bug that crops albums on home page
I don't think that inverting the topbar behaviour would be useful. What if I change the feature to "Always hide Omnibox on scrolldown"?
Well, do whatever you think might be useful, just don't break the application :) Also, I'll add you to the list of contributors, so you can make a new branch and contribute there, and then post a PR, instead of breaking it now. As I suppose I will be making a release in a few days :)
Regards.
Tested, it's working fine. Changes are small and can be reverted anytime.
Yes, you can now push to some branch on the main Repo, and I will pull it to the main one when you are completely done with it :) Till that time, you can just make a branch on main Repo, and tell me when you are done so I can pull it. This PR will remain open till that time :)
I don't know if I got it D: Exactly what I have to do right now? Ignore my fork and work on your main repo creating branches? On Android Studio I have to checkout your projects or I can keep my fork?
P.s.: Not an advanced git-guy here, sorry!
You have to make advancements in the main repo, by making a new branch.
I've found a bug an by now not a fix, happening on official 1.4.6: while going back from web page to grid view with omnibox on top hidden after scrolling, app will crash. I've fixed it for omnibox on bottom position, but the grid goes over the screen on top. @james9909 any ideas to fix it? I'll remove the bottom fix on next commit, 'cause it's just a bad workaround.
EDIT:
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.widget.RelativeLayout.getVisibility()' on a null object reference
at io.github.UltimateBrowserProject.View.SwitcherPanel.onInterceptTouchEvent(SwitcherPanel.java:370)
[...]
Well, 1.4.6 hasn't introduced Scroll Hiding so it won't be publicly happening, which is good so we can silently resolve the bug, and yeah @james9909 must be knowing how to fix that cause he had it :)
Ok, cool, I thought that my local backup was 1.4.6.
Basically, I can say where the bug is happening, when you press back button when the omnibox is hidden, it returns to the homescreen, where omnibox cannot be hidden, and due to visibility set to GONE, I think it cannot find the omnibox on home. Must be an easy fix where you bring back the omnibox on back click.
Also the omnibox is gone because @james9909 must have set the padding to 0. setting it back to 48dp might do the trick.
But setting it back to 48 causes another problem where when you scroll with omnibox at the bottom, a blank background space is created on the top, as the same size as that of the omnibox
Also, your local backup seems to have version 1.4.6 because the version isn't bumped until a stable release is made.
@balzathor Don't you think that the bug has something to do with this?
As I still had the version without automatic omnibox hiding, the webview was displaying correctly, only after this was added, the bug appeared.
So this is what I was trying to fix...
I did some theming experiments but it's not so simple to write nice and clean parametric code for this feature (I'd really like to avoid
setBackgroundColor()
things). I'll think a bit more about it.