2011-05-26 8 views
5

que tienen diseño simple como esto: (es para el correo)¿Cómo estirar el diseño para llenar la pantalla?

<ScrollView android:layout_height="0dp" android:layout_width="fill_parent" android:layout_weight="1" android:background="@color/red_start"> 

     <LinearLayout android:layout_height="fill_parent" android:layout_width="fill_parent" android:orientation="vertical" android:background="@color/blue_start"> 

      <TextView style="@style/MyTextViewLabel" android:text="From" android:layout_marginTop="5dp"/> 

      <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/shape_white_rounded"> 
       <TextView style="@style/MyTextViewLabel.Black" android:id="@+id/tv_sender" /> 
      </LinearLayout> 

      <TextView style="@style/MyTextViewLabel" android:text="Subject" android:layout_marginTop="5dp"/> 

      <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/shape_white_rounded"> 
       <TextView style="@style/MyTextViewLabel.Black" android:id="@+id/tv_subject" /> 
      </LinearLayout> 

      <TextView style="@style/MyTextViewLabel" android:text="Body" android:layout_marginTop="5dp"/> 

      <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/shape_white_rounded"> 
       <TextView style="@style/MyTextViewLabel.Black" android:id="@+id/tv_body" /> 
      </LinearLayout> 

     </LinearLayout> 

    </ScrollView> 

Por alguna razón no se llenará LinearLayout ScrollView como espero. Básicamente, quiero hacer que tv_body llene la pantalla y si hay más texto, debería ser desplazable. En este momento se ve así. Añadí colores para ilustrar ese tramo ScrollView pero no lo hace .. LinearLayout

enter image description here

Respuesta

0

¿Qué pasa si cambia android:layout_height="0dp" en su ScrollView a android:layout_height="match_parent"?

+0

no hicieron diferencia – katit

Cuestiones relacionadas