滚动背景而前景物体停留在静态的android [英] scroll background while foreground objects stay static in android

查看:123
本文介绍了滚动背景而前景物体停留在静态的android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

滚动自定义视图。它的运作良好。

我希望能够在该视图的前景添加一个水平的LinearLayout 。非常重要的是,我想在的LinearLayout 自定义视图滚动保持静态

I want to be able to add a horizontal LinearLayout in the foreground of that view. Very importantly, I want the LinearLayout to stay static as the custom view is scrolled.

所以基本上,我会怎么做呢?通常情况下,当我有前景看法,那一刻我点击的背景下,前景消失(我通常使用对话框前景

So basically, how would I do that? Normally, when I have a foreground view, the moment I click the background, the foreground disappears (I usually use Dialog for the foreground)

推荐答案

包装在的FrameLayout RelativeLayout的。确保你的前景目标是在布局中的最后一个项目,所以它作为一个覆盖。

Wrap everything in a FrameLayout or a RelativeLayout. Make sure your foreground object is the last item in the layout so it acts as an overlay.

这篇关于滚动背景而前景物体停留在静态的android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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