2011-05-18 2 views
2

привета я поставил Скользящий ящик в моем приложенииРаздвижной Проблема расположения выдвижных ящиков в андроиде

, но это занимает пространство, как в изображении ниже, если лоток открыт

enter image description here

и если оно близко то выглядит как

enter image description here

enter image description here

Моя раскладка ниже

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout android:id="@+id/LinearLayout01" 
    android:layout_width="fill_parent" android:layout_height="fill_parent" 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" android:gravity="bottom" android:background="@drawable/androidpeople"> 
    <LinearLayout 
    android:layout_width="fill_parent" android:layout_height="wrap_content" 
    android:orientation="vertical"> 
    <Button android:id="@+id/Button01" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Content"> 
     </Button> 
     <Button android:id="@+id/Button02" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Content"> 
     </Button> 
     <Button android:id="@+id/Button03" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Content"> 
     </Button> 
     <Button android:id="@+id/Button01" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Content"> 
     </Button> 
     <Button android:id="@+id/Button02" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Content"> 
     </Button> 
     <Button android:id="@+id/Button03" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Content"> 
     </Button> 

    </LinearLayout> 
    <SlidingDrawer 
     android:layout_width="wrap_content" 
     android:id="@+id/SlidingDrawer" 
     android:handle="@+id/slideHandleButton" 
     android:content="@+id/contentLayout" 
     android:padding="10dip" 
     android:layout_height="250dip"> 
     <Button android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:id="@+id/slideHandleButton" 
      android:background="@drawable/closearrow"> 
     </Button> 
     <LinearLayout android:layout_width="wrap_content" 
      android:id="@+id/contentLayout" 
      android:orientation="vertical" 
      android:gravity="center|top" 
      android:padding="10dip" 
      android:background="#C0C0C0" 
      android:layout_height="wrap_content"> 


     <Button android:id="@+id/Button01" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Content"> 
     </Button> 
     <Button android:id="@+id/Button02" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Content"> 
     </Button> 
     <Button android:id="@+id/Button03" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Content"> 
     </Button> 
</LinearLayout> 
    </SlidingDrawer> 
</LinearLayout> 

Моя проблема даже выдвижной ящик закрыт он занимает пространство, и я хочу, чтобы удалить его, так что первая кнопка в верхней части экрана можно спуститься

ответ

3

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

+0

Привет, он отлично работает, я не думал использовать относительную компоновку. – Dharmendra

+2

Использование рамочной компоновки в качестве корневой компоновки обычно рекомендуется. –

Смежные вопросы