我的layout_margin存在問題。我要讓我的佈局看起來像:Android中具有相同layout_margin的複雜佈局
(以「A」是保證金)
我的問題是,當我建立我在其他屏幕尺寸的佈局,它看起來像:
我怎樣才能使它美麗與不同的屏幕尺寸?這是我的佈局:
<LinearLayout
android:id="@+id/footer_result_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal" >
<ImageView
android:id="@+id/btn_recommendtion"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/coodinate" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_marginTop="20dip"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal" >
<ImageView
android:id="@+id/btn_facebook"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_margin="5dip"
android:layout_weight="1"
android:adjustViewBounds="true"
android:src="@drawable/fb" />
<ImageView
android:id="@+id/btn_mixi"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_margin="5dip"
android:layout_weight="1"
android:adjustViewBounds="true"
android:src="@drawable/mixi" />
</LinearLayout>
</LinearLayout>
當我在eclipse和droiddraw中測試它時,這種佈局不起作用http://www.droiddraw.org/。按鈕重疊。 – 2012-02-16 19:39:51
@PlasticSturgeon現在編輯它更加正確。感謝您的注意。 – noob 2012-02-17 05:20:36