相対レイアウト内に 3 つの線形レイアウトがあります。エミュレーターと物理デバイスで動作しているようですが、Eclipse では完全にオフになっています。
私のコードに間違いがあるのか、それとも Eclipse の通常の動作なのかはわかりません。
コードは次のとおりです。
<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"
tools:context=".MainActivity" >
<LinearLayout
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center"
android:background="#E89745"
android:layout_alignParentTop="true"
android:layout_above="@+id/logins"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="header"
android:gravity="center"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/logins"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="#F7E7AB">
<EditText
android:id="@+id/EditText01"
android:layout_height="wrap_content"
android:layout_width="match_parent"
/>
<EditText
android:id="@+id/EditText02"
android:layout_height="wrap_content"
android:layout_width="match_parent"
/>
<Button
android:id="@+id/Button01"
android:text="Button"
android:layout_height="wrap_content"
android:layout_width="match_parent"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/footer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_below="@+id/logins"
android:layout_alignParentBottom="true"
android:background="#61A179"
android:gravity="center"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="footer" />
</LinearLayout>
</RelativeLayout>
Eclipse ではどのように見えるか:
エミュレーターとデバイスでは: