Jay*_* S. 1 android slidingdrawer slidingmenu ecslidingviewcontroller
我正在尝试使用umano的SlidingUpPanel并将滑块设为ViewPager.
但是,当尝试向左和向右滚动时,ViewPager不会移动.触摸事件似乎被SlidingUpPanel拦截.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<com.sothree.slidinguppanel.SlidingUpPanelLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/slider_layout"
android:layout_gravity="bottom">
<!-- Top Panel -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
</LinearLayout>
<!-- Sliding Panel -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<android.support.v4.view.ViewPager
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/pager">
</android.support.v4.view.ViewPager>
</LinearLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
小智 5
尝试:
或者,除了用于拖动的ViewPager之外,创建一个单独的View,并相应地将DragView设置为此View,ViewPAger应该单独接收触摸事件并且可以处理它们.(后者是我如何做到并与其他布局一起工作)
归档时间: |
|
查看次数: |
1251 次 |
最近记录: |