2015-01-30 4 views
0
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:paddingBottom="@dimen/activity_vertical_margin" 
android:paddingLeft="@dimen/activity_horizontal_margin" 
android:paddingRight="@dimen/activity_horizontal_margin" 
android:paddingTop="@dimen/activity_vertical_margin" 
tools:context="com.example.elektro.MainActivity" 
android:background="@drawable/radial_background" > 

<ImageView 
    android:id="@+id/imageView1" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:src="@drawable/brutus_blank" /> 

<Button 
    android:id="@+id/b_open1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignBottom="@+id/imageView1" 
    android:layout_centerHorizontal="true" 
    android:layout_marginBottom="150dp" 
    android:background="@drawable/open" /> 

<ImageView 
    android:id="@+id/wave1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignTop="@+id/imageView1" 
    android:layout_centerHorizontal="true" 
    android:layout_marginTop="20dp" 
    android:src="@drawable/abc_ab_share_pack_holo_dark" /> 

안드로이드 : 디자인은 모든 장치

내가 다른 장치를 사용하여 실행할 때이 내 레이아웃 XML 코드에 대해 동일하지 않습니다, 레이아웃의 디자인은 각 devices.For 예를 들어 서로 다른 모양 버튼이 수행 같은 지역에 나타나지 않습니다. 어떻게 해결할 수 있습니까?

답변

0

닫기 태그가 누락되었습니다. 닫기 RelativeLayout 태그를 시도 :

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:paddingBottom="@dimen/activity_vertical_margin" 
android:paddingLeft="@dimen/activity_horizontal_margin" 
android:paddingRight="@dimen/activity_horizontal_margin" 
android:paddingTop="@dimen/activity_vertical_margin" 
tools:context="com.example.elektro.MainActivity" 
android:background="@drawable/radial_background" > 

<ImageView 
    android:id="@+id/imageView1" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:src="@drawable/brutus_blank" /> 

<Button 
    android:id="@+id/b_open1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignBottom="@+id/imageView1" 
    android:layout_centerHorizontal="true" 
    android:layout_marginBottom="150dp" 
    android:background="@drawable/open" /> 

<ImageView 
    android:id="@+id/wave1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignTop="@+id/imageView1" 
    android:layout_centerHorizontal="true" 
    android:layout_marginTop="20dp" 
    android:src="@drawable/abc_ab_share_pack_holo_dark" />