<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/btn1"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
<Button
android:id="@+id/btn2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_toRightOf="@+id/btn1"/>
<Button
android:id="@+id/btn2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_toRightOf="@+id/btn1"/>
<!--x7-->
J'ai placé 7 boutons dans son relatif. Et je voudrais ajuster leur «largeur» à la même taille pour s'adapter à l'écran. Que dois-je faireLargeur du bouton de mise à l'échelle automatique dans RelativeLayout
est-il nécessaire de mettre relativeLayout en tant que parent? –
android: layout_width = "match_parent" ne fonctionne pas? – Vega
Si je peux le faire sans relativeLayout, je ne mettrai pas relativeLayout en tant que parent. –