2013-04-20 8 views
5

के रूप में इस छवि पर दिखाया मैं एक लेआउट:एंड्रॉयड स्लाइड करने के लिए देखें

Layout

मैं उपयोगकर्ता अधिक जानकारी देखने के भाग 'विवरण दिखाएं ...' नीचे खींच करने में सक्षम होना चाहता हूँ। मैंने स्लाइडिंग ड्रावर की कोशिश की, लेकिन इसके साथ कोई भाग्य नहीं है। क्या कोई सुझाव है, जैसे कोड का एक टुकड़ा, या एक तृतीय पक्ष घटक जो चाल करेगा? या यहां तक ​​कि एक और यूआई लेआउट जो उपयोगकर्ता अनुभव को बाधित किए बिना, अधिक जानकारी को सहजता से दिखाने के लिए उपयुक्त होगा।

यह 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 लाइब्रेरी का उपयोग पर विचार करें। यह शक्तिशाली लचीला है और आप इसके साथ कुछ भी कर सकते हैं। आप बस फोन करके ActionBar स्लाइड कर सकते हैं:

setSlidingActionBarEnabled(true); 

https://github.com/jfeinstein10/SlidingMenu

+0

स्लाइडिंगमेनू लाइब्रेरी बाएं और दाएं दराज के लिए है। एक ड्रॉपडाउन के लिए नहीं। – Nizam

संबंधित मुद्दे