如何增加覆盖的景色在Android的其他看法? [英] How to add overlay view over other view in android?
本文介绍了如何增加覆盖的景色在Android的其他看法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望把上面的按钮图像视图。
I want to put button above image view.
我怎样才能做到这一点?
How can i do this?
(请,不提供设置背景,因为我需要的ImageView)
(Please, don't offer to set Background, cause i need ImageView)
推荐答案
设为背景!
只是开个玩笑......你需要的是把你的意见 RelativeLayout的
里面有什么。喜欢的东西都可以工作:
Just kidding... what you need is put your views inside a RelativeLayout
. Something like will work:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:text="blah blah"/>
</RelativeLayout>
注意使用PARAMS像 layout_alignParentLeft
这是用来定位在要视图。
Notice the use of params like layout_alignParentLeft
which are used to position the view where you want.
这篇关于如何增加覆盖的景色在Android的其他看法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文