material design - android lollipop toolbar: how to hide/show the toolbar while scrolling? -
material design - android lollipop toolbar: how to hide/show the toolbar while scrolling? -
i'm using new toolbar widget introduced in appcompat / support-v7. hide/show toolbar depending on if user scrolling up/down page, in new google's playstore app or newsstand app. there built toolbar widget or should using in conjunction framelayout , observablescrollview?
as far know there nil build in you. have @ google io sourcecode, baseactivity. search "auto hide" or @ onmaincontentscrolled
in order hide toolbar
can this:
toolbar.animate().translationy(-toolbar.getbottom()).setinterpolator(new accelerateinterpolator()).start();
if want show 1 time again call:
toolbar.animate().translationy(0).setinterpolator(new decelerateinterpolator()).start();
android-5.0-lollipop material-design android-toolbar
Comments
Post a Comment