2015-07-21 92 views
0

我做了使用sothree slideuppanel從GitHub link here的佈局。 當我使用它的主要內容也向上滾動dragview。他們在那裏說有一種方法setOverlayed。但我試過那個不適合我的工作。有沒有人有這個想法?有沒有人有想法刪除Sothree SlideUpPanel佈局中的主要內容的默認推送?

這是我的代碼

<com.sothree.slidinguppanel.SlidingUpPanelLayout 
    xmlns:sothree="http://schemas.android.com/apk/res-auto" 
    android:id="@+id/sliding_layout" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:gravity="bottom" 
    sothree:umanoPanelHeight="68dp" 
    sothree:umanoShadowHeight="4dp" 
    sothree:umanoParalaxOffset="100dp" 
    sothree:umanoDragView="@+id/dragView" 
    sothree:umanoOverlay="true"> 
<LinearLayout 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical"> 


    <include 
     android:id="@+id/tool_bar" 
     layout="@layout/tool_bar"> 
    </include> 

    <SlidingTabLayout 
     android:id="@+id/tabs" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:background="@color/black" 
     android:elevation="2dp"/> 

    <android.support.v4.view.ViewPager 
     android:id="@+id/pager" 
     android:layout_height="match_parent" 
     android:layout_width="match_parent" 
     android:layout_weight="1"> 

    </android.support.v4.view.ViewPager> 

</LinearLayout> 
    <LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:background="#ffffff" 
     android:orientation="vertical" 
     android:clickable="true" 
     android:focusable="false" 
     android:id="@+id/dragView"> 


     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_gravity="start" 
      android:gravity="start" 
      android:clickable="true" 
      android:id="@+id/actionBarCustom" 
      android:background="@color/black" 
      android:layout_height="?actionBarSize"> 
      <ImageView 
       android:id="@+id/backFloatMenu" 
       android:layout_marginLeft="5dp" 
       android:layout_width="wrap_content" 
       android:src="@drawable/abc_ic_ab_back_mtrl_am_alpha" 
       android:layout_height="match_parent" /> 
     </LinearLayout> 


     <include 
      android:id="@+id/sv" 
      layout="@layout/float_latout"/> 


    </LinearLayout> 

</com.sothree.slidinguppanel.SlidingUpPanelLayout> 
+1

此鏈接可以幫助你https://github.com/ShakeJ/AndroidSlidingUpPanel/blob/cf95b2af29c785e57e19871ba4ea9ad19a51fcf7/library/src/com/sothree/slidinguppanel/SlidingUpPanelLayout.java –

回答

1

這條線:

sothree:umanoOverlay="true" 

定義的面板覆蓋的主要內容。

+0

當我使用它動作條也推升。我不希望那樣推高。搜索Maincontent必須留在它的位置:( –

+1

你說的動作條也推?即使你設置umanoOverlay =「真」? – yshahak

+0

是...我使用外部工具欄作爲我的動作條。 –

相關問題