使用滑动面板库无法滚动ListView

时间:2018-12-17 14:52:54

标签: java android xml android-studio android-layout

我有一个歌曲列表视图和一个带有按钮的向上滑动面板,但是我无法滚动浏览这些歌曲。卸下向上滑动的面板时,我可以滚动。我也有一个带有选项卡的选项卡布局,但是我无法在各个选项卡之间滑动,而无法切换选项卡的唯一方法是点击顶部的选项卡。

这里是我的XML

<?xml version="1.0" encoding="utf-8"?>
<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"
tools:context=".MainActivity">

<com.sothree.slidinguppanel.SlidingUpPanelLayout     xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="bottom"
    tools:context=".MainActivity"
    app:umanoPanelHeight="70dp"
    app:umanoShadowHeight="5dp">

    <android.support.design.widget.CoordinatorLayout     xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-    auto"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <include layout="@layout/songs_layout" />

    </android.support.design.widget.CoordinatorLayout>

    <RelativeLayout

        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clickable="true"
        android:focusable="false">

        <include layout="@layout/slideup_nowplaying"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>

    </RelativeLayout>

</com.sothree.slidinguppanel.SlidingUpPanelLayout>

</RelativeLayout>

1 个答案:

答案 0 :(得分:0)

如果滑动面板内部有可滚动视图,请确保将面板上的umanoScrollableView属性设置为受支持的嵌套滚动。面板开箱即用地支持ListView,ScrollView和RecyclerView

sothree:umanoScrollableView =“ @ + id / list” list是列表视图的ID

相关问题