2012-01-14 2 views
0

나는 그 main.xml에 파일이처럼 안드로이드 앱 만드는 중이라서 :레이아웃이 산만 해지고 있습니까?

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:background="@drawable/background_full"> 

     <Button android:id="@+id/nxt_btn" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:gravity="center" 
      android:layout_marginLeft="170dp" 
      android:layout_marginTop="100dp" 
      android:background="@drawable/button_background"/> 

    <Button android:id="@+id/back_btn" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:gravity="center" 
      android:layout_marginLeft="360dp" 
      android:layout_marginTop="100dp" 
     android:background="@drawable/button_background"/> 

     <com.broov.player.DrawView 
      xmlns:android="http://schemas.android.com/apk/res/android" 
      android:id="@+id/drawingSurface" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent" 
     android:layout_alignParentLeft="true" 
      android:layout_alignParentTop="true" 
      android:visibility="visible" /> 
</RelativeLayout> 
내 에뮬레이터에서

이 잘 작동하고, 그러나 장치 또는 에뮬레이터 해상도가 변경 될 때 레이아웃이 산만되었다. 레이아웃이 모든 머신에 보편적이어야합니다.

답변

0

레이아웃의 구성 요소 관계를 toLeftOf 또는 toRightOf로 지정해야합니다.

관련 문제