Comment puis-je centre ImageButton dans la présente LinearLayoutAndroid: Centre ImageButton à LinearLayout
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/main"
>
ImageButton
<ImageButton android:id="@+id/btnBut"
android:background="@drawable/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
Je ne veux pas utiliser des tailles fixes.
Merci
Je tente avec ce centre ImageButton mais seulement horizontal, je veux être au centre de l'écran. Pouvez-vous m'aider ? Merci – Jovan
Pouvez-vous poster toute la mise en page alors? –
J'ai corrigé cela avec RelativeLayout et android: layout_centerInParent = "true" – Jovan