Skip to content Skip to sidebar Skip to footer

How To Hide Footer While Scrolling Up Webview In Android?

I have webview with linear layout with three buttons at bottom i.e. footer. I want to hide that footer while scrolling up webview and show footer on scrolling down. Please Help me!

Solution 1:

Try this, I also never tried so let me know if it worked or not.

 scroll.setOnTouchListener(new OnTouchListener() {

            public boolean onTouch(View v, MotionEvent event) {

                if (event.getAction() == MotionEvent.ACTION_UP) {

                   //show footer
                }
else  if (event.getAction() == MotionEvent.ACTION_DOWN) {

                   //hide footer
                }    
                return false;
            }
    });

Post a Comment for "How To Hide Footer While Scrolling Up Webview In Android?"