Altura mitad fill_parent xml
¿Cómo puedo hacer con LinearLayout
altura half fill_parent
en xml?
<LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:weightSum="1"> <ImageView android:layout_height="fill_parent" android:layout_width="0dp" android:layout_weight="0.5"/> </LinearLayout>
Me gustaría hacer algo similar con la altura.
- ¿Cómo obligo a eclipse a mostrar diseños y estilos xml como texto?
- Lectura de un archivo .xml desde sdcard
- Enviar blob o matriz de bytes en XML
- Android - Creación de una imagen animada de tipo analógico para el movimiento
- La ventana emergente AutoCompleteTextView de Android se mueve tras mostrar
- Cómo crear un AttributeSet en Android?
- ¿Cómo puedo poner utf-16 caracteres en Android cadena de recursos?
- ¿Es posible guardar layout_weight en un xml?
- CardView ha perdido el margen al inflar
- Cómo rellenar una vista de cuadrícula en XML
- ImageViews en LinearLayout redondeado
- Permiten a los usuarios crear formularios dentro de la aplicación android survey / data collection
- ¿Posible inflar una disposición de XML en un servicio? (Androide)
I just want have a half of screen with 1 linearLayout and half screen with other one
Prueba esto
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:weightSum="2" android:orientation="vertical" > <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:background="#192832"></LinearLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:background="#193222"></LinearLayout> </LinearLayout>
Dos diseños lineales que ocupan la mitad de la pantalla cada uno.