+ override fun onOverScrolled(scrollX: Int, scrollY: Int, clampedX: Boolean, clampedY: Boolean) {
+ // Run the default commands.
+ super.onOverScrolled(scrollX, scrollY, clampedX, clampedY)
+
+ // Display the bottom app bar if it has been hidden and the WebView was over-scrolled at the top of the screen.
+ if ((MainWebViewActivity.appBarLayout.translationY != 0f) && (scrollY == 0) && clampedY) {
+ // Animate the bottom app bar onto the screen.
+ val objectAnimator = ObjectAnimator.ofFloat(MainWebViewActivity.appBarLayout, "translationY", 0f)
+
+ // Make it so.
+ objectAnimator.start()
+ }
+ }