Ver Mensaje Individual
  #5  
Viejo 24/01/15, 01:27:23
Array

[xs_avatar]
oxot oxot no está en línea
Usuario muy activo
 
Fecha de registro: may 2010
Localización: Santiago
Mensajes: 741
Modelo de smartphone: Xiaomi RedRice
Tu operador: Pepephone
Entiendo lo que dices pero puedes arreglarlo fácilmente. Haces el layout de los botones como un wrap_content y así se ajustará su altura automáticamente y el ImageView le pones a la propiedad layout_weight="1" para que rellene el resto del layout.

Algo así:
Código:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" 
    android:layout_width="match_parent"
    android:layout_height="match_parent">


    <ImageView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:id="@+id/imageView"
        android:src="@drawable/ic_launcher"
        android:layout_weight="1"
        android:background="@android:drawable/editbox_background_normal" />

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:gravity="center">

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="New Button"
            android:id="@+id/button"
            android:layout_gravity="center_vertical" />

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="New Button"
            android:id="@+id/button2"
            android:layout_gravity="center_vertical" />
    </LinearLayout>
</LinearLayout>
Por cierto, fill_parent está desaconsejado a partir de la API 8, vamos, desde tiempos de maria castaña. Ahora deberías usar match_parent.
Te quedará algo así:
Imágenes Adjuntas
Tipo de Archivo: png Sin título.png (151.5 KB, 14 visitas)
Responder Con Cita