0

I am trying to achieve sth. that the image below describes best. I tried SlidingDrawer, even WrappingSlidingDrawer proposed by somebody here on SO. But my problems with SlidingDrawer are (1) it occupies a constant height, and I want it to 'shift' the listview below. (2) It expands from down - up and I want it to expand from up to down (3) it has its header above its body and I want its header below its body. How to do it?

Drawer hidden and expanded

My pseudocode follows:

<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>

<!-- Header >    
    android:id="@+id/header"  
            android:layout_width="fill_parent"
    android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
    -->    

<!-- Footer >    
    android:id="@+id/footer"  
            android:layout_width="fill_parent"
    android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
    -->    

<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_above="@id/footer"
    android:layout_below="@id/header"
    android:orientation="vertical"
    >

    <!-- >my.package.WrappingSlidingDrawer -->
    <SlidingDrawer
         android:id="@+id/myDrawerBar"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:orientation="vertical"

         android:content="@+id/Body"
         android:handle="@+id/Subheader"  >

         <LinearLayout
             android:id="@id/Subheader"
             style="@style/Subheader"
             android:layout_width="fill_parent"
             android:layout_height="20dip">
             <TextView
                 android:id="@+id/SubheaderLabel"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 />
         </LinearLayout>

         <LinearLayout
             android:id="@id/Body"
             android:layout_width="fill_parent"
             android:layout_height="wrap_content">
             .....
         </LinearLayout> 
    <!-- /my.package.WrappingSlidingDrawer-->
    </SlidingDrawer>    


    <ListView
        android:id="@+id/myListView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
         />

</LinearLayout>        

</RelativeLayout>
Yar
  • 4,543
  • 2
  • 35
  • 42
  • 2 & 3 aren't problems SlidingDrawer does this. Have you looked at ExpandableListView? – Blundell Apr 26 '12 at 22:22
  • Thanks, I've used ExpendableListView (a list with groups expendable to items). It does not solve this issue. Do you know of an example of SlidingDrawer that solves 2 & 3 please? – Yar Apr 27 '12 at 06:45
  • OK. I got an answer: http://stackoverflow.com/questions/4946295/android-expand-collapse-animation – Yar Apr 27 '12 at 16:52

0 Answers0