如何在Android中向下滚动视图时隐藏和显示布局? [英] How to hide and show a layout on scrolling down a scroll view in Android?

查看:99
本文介绍了如何在Android中向下滚动视图时隐藏和显示布局?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个特殊的布局,其中包含一个滚动视图和一个位于活动底部的图像.我的问题是,当我开始向上滚动时,该图像将不可见;当滚动到顶部时,该图像将再次可见.

I have a particular layout which consist a scroll view and an image which is at bottom of the activity. My question is that when I start scrolling up that image will not visible and when the scroll reach to top it is visible again.

我附上了我的图片链接,以便您了解我想要的.

I attached my image link so that you get the idea what I want.

推荐答案

您可以使用android支持小部件帖子隐藏/显示基于滚动的图像.

You can achieve this easily with android support widget CoordinatorLayout. Follow this post to hide/show the image based on scrolling.

您可以在此处

这篇关于如何在Android中向下滚动视图时隐藏和显示布局?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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