2012-09-27 47 views
0

我只想做一個很簡單的想:集的ImageView以上的TextView

我想提出一個ImageView的全屏幕上只是一個簡單的TextView他的底,而不是結束,但只是在他的底部..

我嘗試了一些組合,但沒有工作得很好..

這是我目前的基本XML代碼:

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content"> 
    <ImageView 
     android:id="@+id/imgset" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:background="@color/white" 
     android:src="@drawable/creditview" /> 

    <RelativeLayout 
    android:id="@+id/layoutimgset" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content"> 

    <TextView android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="This spot is for Ad" 
     android:textStyle="bold" 
     android:textColor="@color/black" 
     android:background="@color/white" /> 

    </RelativeLayout> 
</LinearLayout> 

這隻能說明ImageView的..

回答

0

嘗試使用您的ImageView這樣的:

android:layout_weight="1" 

在這種情況下你不需要的RelativeLayout。 或者把所有的RelativeLayout和使用

android:layout_below="@+id/imgset" 

您的TextView