I have a toolbar aligned at the bottom and above it over a WebView that fill the remaining height. Now I want to slide the toolbar to hide it, and while it enlivens the height of the web view, it needs to expand. I tried using TranslateAnimation, but, unfortunately, it did not adjust the actual position on the toolbar, but only the content was moved. Here is what I tried:
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="0%"
android:toXDelta="0%"
android:fromYDelta="0%"
android:toYDelta="100%"
android:duration="700"
android:fillAfter="true" />
And the actual code:
final View v = findViewById(R.id.browseToolbar);
Animation animation = AnimationUtils.loadAnimation(someContext, R.anim.toolbar_hide);
v.startAnimation(animation);
How can i do this?
source
share