【发布时间】:2012-03-02 20:16:24
【问题描述】:
我正在为我的屏幕使用这个布局:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" android:background="@drawable/tmp" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/uph"
android:layout_gravity="top|center" android:layout_marginTop="-10dp"/>
<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/propfile"
android:layout_gravity="top|center"/>
</LinearLayout>
我想在 imageView2 上方的屏幕上添加一个 TextView。
当我将它添加到 xml 时,它会显示在图像下方。
我需要做什么才能将TextView 放在图像上。
【问题讨论】:
标签: java android android-layout