如何把在彼此的顶端元件在相同的xml布局? [英] How to put elements on top of each other in the same xml layout?

查看:146
本文介绍了如何把在彼此的顶端元件在相同的xml布局?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何可以有一个以上的按钮,或在另一个的顶部上的按钮,并在同一位置的文本视图在一个布局,但一个?

我想有隐藏的大部分时间,但偶尔会具有非侵入弹出将提示东西的按钮。的其余时间会有一个文本视图,它是一块不同尺寸

解决方案

请看一看的 RelativeLayouts

他们用安卓layout_below 安卓layout_above 来定位元素低于/高于其他元素。

How can I have more than one button, or a button and a text view in the same location in one layout but one on top of the other?

I want to have a button that is hidden most of the time, but occasionally will have a non intrusive popup that will prompt something. The rest of the time there will be a text view there that is a different size.

解决方案

Please take a look at RelativeLayouts.

They use android:layout_below and android:layout_above to position elements below/above other elements.

这篇关于如何把在彼此的顶端元件在相同的xml布局?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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