2013-04-20 11 views
5

Ich habe ein Layout wie auf diesem Bild gezeigt:Android Slide erweitern Ansicht

Layout

I Benutzer will die ‚Details ...‘ können, ziehen Sie nach unten Teil mehr Informationen zu sehen. Ich versuchte SlidingDrawer, aber kein Glück damit. Gibt es einen Vorschlag, wie ein Stück Code oder eine Komponente eines Drittanbieters, die das tun würde? Oder sogar ein anderes UI-Layout, das geeignet ist, mehr Informationen intuitiv zu zeigen, ohne die Benutzererfahrung zu sehr zu stören.

Dies ist das XML-Layout ich zur Zeit bin mit, aber es ist nur ein Arbeitsentwurf:

<?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> 
+0

Hast du es getan? – Nizam

Antwort

0

SlidingMenu Bibliothek von GitHub mit in Betracht. Es ist mächtig flexibel und du kannst auch ALLES damit machen. Sie können die ActionBar gleiten durch einfach nur telefonieren:

setSlidingActionBarEnabled(true); 

https://github.com/jfeinstein10/SlidingMenu

+0

SlidingMenu-Bibliothek ist für linke und rechte Schubladen. Nicht für ein Dropdown-Menü. – Nizam