2011-01-12 11 views
0

誰かがこのためのXMLレイアウトコードを投稿できますか(リンクを見てください)、本当にこれは完了しません。 ありがとうございます。AndroidのレイアウトXMLコード

http://img832.imageshack.us/img832/6589/layouthelp.jpg

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:background="@drawable/background" android:layout_gravity="bottom" android:orientation="vertical" android:baselineAligned="false"> 
<ImageView android:id="@+id/ImageView01" android:layout_width="fill_parent" android:background="@drawable/logo" android:layout_height="wrap_content"></ImageView> 
<LinearLayout android:layout_gravity="center_vertical" android:id="@+id/LinearLayout02" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"><Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Button02" android:layout_gravity="right" android:text="@+id/Button02"></Button> 
<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Button03" android:text="@+id/Button03"></Button> 
<Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/Button01" android:layout_gravity="bottom" android:text="@+id/Button01"></Button> 
</LinearLayout> 
</LinearLayout> 
+0

ポストを(今あなたがちょうど行うために私たちを求めてあなたの仕事(宿題?)... –

+0

助けが必要なら、あなたのコードも投稿してください。 – Adinia

+0

これは私のxmlファイルです。 layout_gravityがbottom ...に設定されています.... – Spazzt

答えて

7

RelativeLayout使用してみてください!あなたは疲れていた後、私たちは、あなたがそれを修正することができますどのような

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout 
    android:id="@+id/LinearLayout01" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    > 
<RelativeLayout 
    android:id="@+id/LinearLayout02" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:layout_alignParentBottom="true" 
    android:layout_alignParentLeft="true" 
    > 
    <Button 
     android:id="@+id/Button02" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="@+id/Button02" 
     android:layout_alignParentRight="true" 
     android:layout_alignParentBottom="true" 
     > 
    </Button> 
    <Button 
     android:id="@+id/Button03" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="@+id/Button03" 
     android:layout_toLeftOf="@+id/Button02" 
     android:layout_alignParentBottom="true" 
     > 
    </Button> 
    <Button 
     android:id="@+id/Button01" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="@+id/Button01" 
     android:layout_above="@+id/Button02" 
     android:layout_alignParentRight="true" 
     > 
    </Button> 
</RelativeLayout> 
<ImageView 
    android:id="@+id/ImageView01" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentTop="true" 
    android:layout_alignParentLeft="true" 
    > 
</ImageView> 

+0

ありがとう、作品!また、2番目の相対的なレイアウトなしでも動作します。 – Spazzt

+2

@Spazztその場合、彼の答えは受け入れとしてマークする必要があります。 – greatwolf

関連する問題