2011-09-10 4 views
0

popup: la zone entre le bouton Fermer et la ligne de bordure n'est pas assez large en mode portrait.Problème dans la disposition de la table

Après avoir testé le combiné en mode portrait. Envoyez un SMS ou un MMS au combiné testé. Observez la fenêtre contextuelle située entre le bouton Fermer et la ligne de bordure.

Résultat: la zone entre le bouton Fermer et la ligne de bordure n'est pas assez large. Voir captures d'écran jointives Résultat attendu: la zone entre le bouton Fermer et la ligne de bordure devrait être similaire à la touche de la ligne de bordure.

Impossible re-produire dans le cas du mode paysage ..

<ScrollView 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:background="#00000000"> 
<RelativeLayout 
      android:layout_height="wrap_content" 
      android:layout_width="300dp"> 
<LinearLayout 
    android:layout_width="300dp" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" 
    android:layout_gravity="center"> 
    <TextView 
      android:id="@+id/unread_messges_text" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:padding="5dp" /> 
    <View 
     android:layout_height="1dp" 
     android:layout_width="fill_parent" 
     android:background="@color/background_light" 
     /> 
    <RelativeLayout 
      android:layout_height="wrap_content" 
      android:layout_width="fill_parent" 
      android:layout_margin="5dp" 
      > 
      <ImageView 
        android:id="@+id/contact_photo" 
        android:scaleType="centerCrop" 
       android:layout_width="70dp" 
       android:layout_height="70dp" 
       /> 
      <TextView 
       android:id="@+id/sender_name_number" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_toRightOf="@+id/contact_photo" 
       android:textSize="20dp" 
       android:singleLine="true" 
       android:layout_marginLeft="5dp" 
       /> 
      <TextView 
       android:id="@+id/message_subject" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_toRightOf="@+id/contact_photo" 
       android:layout_below="@+id/sender_name_number" 
       android:textSize="15dp" 
       android:singleLine="true" 
       android:layout_marginLeft="5dp" 
       />  
      <TextView 
       android:id="@+id/message_received_time" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_toRightOf="@+id/contact_photo" 
       android:layout_below="@+id/message_subject" 
       android:text="@string/message_received_time" 
       android:layout_marginLeft="5dp" 
       /> 
    </RelativeLayout> 
    <View 
     android:layout_height="1dp" 
     android:layout_width="fill_parent" 
     android:background="@color/background_light" 
     /> 
    <RelativeLayout 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:id="@+id/message_body_textpart" 
     android:layout_margin="5dp" 
     > 
    </RelativeLayout> 
    <RelativeLayout 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:id="@+id/message_body_imagepart" 
     android:layout_marginLeft="5dp" 
     android:layout_marginBottom="4dp" 
     android:layout_marginRight="5dp" 
     > 
    </RelativeLayout> 

    <TableLayout 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent" 
      android:background="@color/background_light" 
      android:stretchColumns="*"> 
     <TableRow 
      android:layout_gravity="center_horizontal" 
      android:layout_marginTop="3dp" 
      > 
     <Button 
      android:text="@string/reply_button_text" 
      android:id="@+id/reply_button" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content"/> 
     <Button 
      android:id="@+id/next_button" 
      android:text="@string/next_button_text" 
      android:layout_height="wrap_content" 
      android:layout_width="wrap_content"/> 
     <Button 
      android:text="@string/close_button_text" 
      android:id="@+id/close_button" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      /> 
     </TableRow> 
    </TableLayout> 

</LinearLayout> 
</RelativeLayout> 
</ScrollView> 
+0

Pouvez-vous s'il vous plaît élaborer votre question – AB1209

Répondre

1

Je voudrais essayer une LinearLayout horizontale plutôt que la table vue pour les 3 boutons en bas. Définissez la largeur de chaque bouton sur 0dip et le poids de la disposition sur 1.

<LinearLayout 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:background="@color/background_light"> 
    <Button 
     android:text="@string/reply_button_text" 
     android:id="@+id/reply_button" 
     android:layout_width="0dip" 
     android:layout_height="wrap_content" 
     android:layout_weight="1"/> 
    <Button 
     android:id="@+id/next_button" 
     android:text="@string/next_button_text" 
     android:layout_height="wrap_content" 
     android:layout_width="0dip" 
     android:layout_weight="1"/> 
    <Button 
     android:text="@string/close_button_text" 
     android:id="@+id/close_button" 
     android:layout_width="0dip" 
     android:layout_height="wrap_content" 
     android:layout_weight="1" 
     /> 
</LinearLayout> 
0

Changement android:layout_marginTop="3dp" de TableRow des boutons pour android:padding="3dp"

padding is for padding space between layout and its child 

margin is for padding space between layout and its parent 
Questions connexes