【问题标题】:ListView not scrollable with Sliding up panel libraryListView 无法使用上滑面板库滚动
【发布时间】:2018-12-17 14:52:54
【问题描述】:

我有一个ListView 的歌曲和一个带有按钮的向上滑动面板,但我无法滚动浏览歌曲。当我移除向上滑动面板时,我可以滚动。我也有一个带有标签的标签布局,但我无法在标签之间滑动,我无法切换标签的唯一方法是点击顶部的标签。

这是我的 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>

【问题讨论】:

    标签: java android xml android-layout


    【解决方案1】:

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

    sothree:umanoScrollableView="@+id/list" 其中list是listview的id

    【讨论】:

      猜你喜欢
      • 2021-03-07
      • 2018-12-30
      • 2021-02-09
      • 2014-03-02
      • 2020-03-31
      • 2015-06-28
      • 1970-01-01
      • 2019-02-15
      相关资源
      最近更新 更多