我試圖做一個底部佈局,如圖像中1獲取底部佈局的扭曲佈局
但是,當應用程序的工作,底部佈局被拉長大屏幕上像圖2:
這裏是源...
<RelativeLayout
android:id="@+id/bottom_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@layout/footer_color"
android:layout_alignParentBottom="true">
<LinearLayout
android:id="@+id/bottom_layout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:weightSum="1.0"
android:orientation="horizontal">
<Button
android:id="@+id/bottom_layout11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:gravity="center"
android:background="@drawable/profile_01"/>
<Button
android:id="@+id/bottom_layout12"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_weight="0.2"
android:background="@drawable/profile_01"/>
<Button
android:id="@+id/bottom_layout13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:gravity="center"
android:background="@drawable/profile_01"/>
<Button
android:id="@+id/bottom_layout14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:gravity="center"
android:background="@drawable/profile_01"/>
<Button
android:id="@+id/bottom_layout15"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:gravity="center"
android:background="@drawable/profile_01"/>
</LinearLayout>
</RelativeLayout>
須─頁腳佈局與在所有分辨率下沒有拉伸都有相同的空間。
我沒有得到我應該在哪裏改進代碼。請回復 。
在此先感謝。
你爲什麼要硬編碼相對佈局的高度50dp..let它被WRAP_CONTENT和公正使用合適大小的圖像.. – Vikram
給出相同的結果@Vikram –
請參閱更新的1 ... –