我做了使用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>
此链接可以帮助你https://github.com/ShakeJ/AndroidSlidingUpPanel/blob/cf95b2af29c785e57e19871ba4ea9ad19a51fcf7/library/src/com/sothree/slidinguppanel/SlidingUpPanelLayout.java –