Android SlidengUpPanelLayout、SwipeRefreshLayout和RecyclerView的正确层次结构
我刚开始在以下布局中使用Android SlidengUpPanelLayout、SwipeRefreshLayout和RecyclerView的正确层次结构,android,android-layout,android-recyclerview,swiperefreshlayout,Android,Android Layout,Android Recyclerview,Swiperefreshlayout,我刚开始在以下布局中使用com.sothree.slidinguppanel.slidinguppanelayout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
com.sothree.slidinguppanel.slidinguppanelayout
:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="com.rburgosnavas.droidfs.MainActivityFragment"
android:id="@+id/main_list_rec"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar_main"/>
<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"
sothree:umanoScrollableView="@+id/swipe_refresh_rec"
>
<!-- Main content -->
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_rec"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</android.support.v4.widget.SwipeRefreshLayout>
<!-- Draggable view -->
<LinearLayout
android:id="@+id/dragView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bright_foreground_material_dark"
android:orientation="vertical"
android:clickable="true"
android:focusable="false">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="LOL-LOL-LOL-LOL-LOL"
/>
</LinearLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
</LinearLayout>
我面临的问题是,RecyclerView
并不总是响应滚动事件,我开始认为我的布局层次结构可能是错误的。我没有在Java方面使用slidengappanellayout
做任何事情,因为我只想简单地开始,我认为这不是一个问题
有什么指针吗?嗨,有结果吗?嗨,有结果吗?