我希望把上面的按钮图像视图。
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.