5

I have a layout as shown on this image:

Layout

I want user to be able to drag down the 'Show details...' part to see more information. I tried SlidingDrawer, but no luck with it. Is there a suggestion, like, a piece of code, or a third-party component that would do the trick? Or even another UI layout that would be suitable for showing more info intuitively, without disrupting user experience too much.

This is the XML layout I'm currently using, but it's just a working draft:

<?xml version="1.0" encoding="UTF-8"?>


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

  <fragment android:id="@+id/map"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:name="com.google.android.gms.maps.SupportMapFragment"/>


  <LinearLayout android:orientation="vertical" 
                android:layout_width="fill_parent" 
                android:layout_height="wrap_content" 
                android:layout_gravity="top"
                android:background="#A0000000">


    <TextView android:id="@+id/message_text_text"
              android:layout_height="wrap_content"
              android:layout_width="fill_parent"
              android:textColor="#FFFFFF"
              android:padding="10dip"
              android:textSize="13sp"/>



    <LinearLayout android:orientation="vertical" 
                  android:visibility="gone"
                  android:id="@+id/details"
                  android:layout_width="fill_parent" 
                  android:layout_height="wrap_content" 
                  android:layout_gravity="top"
                  android:padding="10dip">

      <ListView android:id="@+id/message_list_responses"
                android:layout_width="fill_parent"
                android:layout_marginTop="10dp"
                android:layout_marginLeft="30dp"
                android:layout_height="wrap_content" />  


    </LinearLayout>

    <TextView android:id="@+id/details_button"
              android:layout_height="wrap_content"
              android:layout_width="fill_parent"
              android:textColor="#FFFFFF"
              android:padding="5dip"
              android:onClick="onDetails"
              android:gravity="center"                
              android:clickable="true"
              android:background="#80000000"
              android:text="Show details..."
              android:textSize="11sp"/>
  </LinearLayout>


</FrameLayout>
Lovro
  • 712
  • 1
  • 10
  • 20

1 Answers1

0

Consider using SlidingMenu library from GitHub. It's powerfull flexible and also you can do ANYTHING with it. You can slide the actionbar by just simply calling:

setSlidingActionBarEnabled(true);

https://github.com/jfeinstein10/SlidingMenu

Akshat Agarwal
  • 2,837
  • 5
  • 29
  • 49