2012-09-27 6 views
0

위에 난 그냥 아주 간단한 생각을하고 싶지 :설정 이미지 뷰 텍스트 뷰

나는 그의 아래에없는 이상하지만 그냥 자신의 아래에 단순한 텍스트 뷰와 전체 화면에 이미지 뷰를 데려 가고 싶다는 ..

나는 몇 가지 조합을 시도했지만 아무것도 잘 작동하지

.. 여기

내 현재의 기본 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> 

이 만 이미지 뷰를 보여 ..

답변

0

은 이미지 뷰이 사용하는 것을 시도하십시오 : 당신이 RelativeLayout의 필요하지 않습니다이 경우

android:layout_weight="1" 

. 또는 RelativeLayout의 모든 넣어 당신의 텍스트 뷰

에 대한

android:layout_below="@+id/imgset" 

를 사용