проблема в раскладке стола - PullRequest
0 голосов
/ 10 сентября 2011

всплывающее окно: область между кнопкой закрытия и границей в портретном режиме недостаточно широка.

Протестировав трубку в портретном режиме.Отправьте SMS или MMS на протестированную трубку.Обратите внимание на всплывающее окно в области между кнопкой «Закрыть» и линией границы.

Фактический результат: область между кнопкой «Закрыть» и линией границы недостаточно широка.Просмотр прикрепленных снимков экрана Ожидаемый результат: область между кнопкой «Закрыть» и граница должны быть аналогичны кнопке «Ответить» для линии границы.

Невозможно воспроизвести в случае ландшафтного режима.

<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>

Ответы [ 2 ]

1 голос
/ 10 сентября 2011

Я бы попробовал горизонтальную LinearLayout, а не табличное представление для 3 кнопок внизу. Установите ширину для каждой кнопки на 0dip и layout_weight на 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 голосов
/ 10 сентября 2011

Изменить android:layout_marginTop="3dp" с TableRow кнопок на android:padding="3dp"

padding is for padding space between layout and its child

margin is for padding space between layout and its parent
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...