Je suis en train de faire une mise en page en bas comme dans l'image 1.Obtenir la mise en page déformée de la mise en page en bas
Mais lorsque les travaux d'application, la mise en page en bas obtient étirées sur grand écran comme dans l'image 2:
est ici la source ...
<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>
mise en page de bas de page nécessaire- w espace égal sur toute résolution sans étirement. Je ne comprends pas où je devrais améliorer le code. Répondez, s'il vous plaît .
Merci d'avance.
pourquoi vous hardcoding la hauteur de mise en page par rapport à 50dp..let il être wrap_content et juste utilisez les images de la bonne taille .. – Vikram
donnant le même résultat @Vikram –
voir la mise à jour 1 ... –