Created
June 19, 2014 08:38
-
-
Save marinat/71cac3c1107ecc0f6398 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onScrollChanged(int l, int t, int oldl, int oldt) { | |
super.onScrollChanged(l, t, oldl, oldt); | |
WebTitle webTitle = mBrowser.getTabsActionBar().getTitle(); | |
if (t > oldt) { | |
Tracer.debug("SCROLL", "tbar = " + webTitle.getY() + " t height = " + webTitle.getHeight()); | |
if (-(webTitle.getY() - (t - oldt)) > webTitle.getHeight()) | |
webTitle.setTranslationY(-webTitle.getHeight()); | |
else | |
webTitle.setY(webTitle.getY() - (t - oldt)); | |
Tracer.debug("SCROLL", "tbar CH = " + webTitle.getY()); | |
} else { | |
if (webTitle.getY() + (oldt - t) < 0) | |
webTitle.setTranslationY(webTitle.getY() + (oldt - t)); | |
else | |
webTitle.setTranslationY(0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment