如何隐藏页脚,而在Android的向上滚动的WebView? [英] How to hide footer while scrolling up webview in android?

查看:237
本文介绍了如何隐藏页脚,而在Android的向上滚动的WebView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有与底部即页脚三个按键布局线性的WebView。我希望隐藏页脚时滚动起来的WebView,并显示在向下滚动页脚。

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.

请帮助我!

推荐答案

试试这个,我也从来没有尝试过,所以让我知道它的工作与否。

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;
            }
    });

这篇关于如何隐藏页脚,而在Android的向上滚动的WebView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆