2012-03-11 3 views
0

RelativeLayout 예를 들어 이미지에 textview를 넣을 때, 내가 시도한 모든 장치 (시뮬레이터에서)에 대한 화면상의 위치가 변경되는 문제가 있습니다.커플 장치의 RelativeLayout

<RelativeLayout 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_gravity="top|center" 
    android:layout_marginTop="-70dp" > 

    <ImageView 
     android:id="@+id/imageView2" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:src="@drawable/propfile" /> 


    <TextView 
     android:id="@+id/textView1" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="@string/str_phone" 
     android:textColor="@color/black" 
     android:layout_marginTop="337dp" android:layout_marginLeft="133dp" 
     android:onClick="onClick"     
     android:clickable="true"/> 
</RelativeLayout> 
+0

ImageView 대신 상대/선형 레이아웃 배경을 사용하지 않는 이유는 무엇입니까? –

답변

0

이미지를 상대 레이아웃의 배경으로 설정 한 다음 텍스트 뷰를 사용할 수 있습니다.