2013-04-20 7 views
5

を展開しますAndroidのスライドはこのイメージに示すように、私はレイアウトが表示

Layout

は、私は、ユーザーがより多くの情報を表示するには「...詳細を表示」の部分を下にドラッグできるようにしたいです。私はSlidingDrawerを試しましたが、それには運がありません。そのトリックを行うコード、または第三者コンポーネントのような提案はありますか?さらに、ユーザーエクスペリエンスを邪魔することなく、より多くの情報を直感的に表示するのに適した別のUIレイアウトも可能です。

これは私が現在使用しているXMLレイアウトであるが、それは単なる作業草案です:

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

は、あなたはそれを成し遂げるましたか? – Nizam

答えて

0

はGitHubのからSlidingMenuライブラリを使用することを検討してください。それは強力な柔軟性とも何かそれを行うことができます。あなたは、単に呼び出すことでアクションバーをスライドさせることができる。

setSlidingActionBarEnabled(true); 

https://github.com/jfeinstein10/SlidingMenu

+0

SlidingMenuライブラリは左右の引き出し用です。ドロップダウンのものではありません。 – Nizam

関連する問題