Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了android – CollapsingToolbarLayout ImageView不可滚动大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
使用 cheesesquare – android support library example是否可以使Header ImageView可滚动?
<android.support.design.widget.AppBarLayout
    android:id="@+id/appbar"
    android:layout_width="match_parent"
    android:layout_height="@dimen/detail_BACkdrop_height"
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
    android:fitsSystemWindows="true">

    <android.support.design.widget.CollapsingToolbarLayout
        android:id="@+id/collapsing_toolbar"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_scrollFlags="scroll|exitUntilCollapsed"
        android:fitsSystemWindows="true"
        app:contentScrim="?attr/colorPriMary"
        app:expandedtitleMarginStart="48dp"
        app:expandedtitleMarginEnd="64dp">

        <ImageView
            android:id="@+id/BACkdrop"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="centerCrop"
            android:fitsSystemWindows="true"
            app:layout_scrollFlags="scroll" 
            app:layout_collapseMode="parallax" />
            ...
    </android.support.design.widget.CollapsingToolbarLayout>

<android.support.v4.widget.nestedScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true"
    app:layouT_Behavior="@String/appbar_scrolling_view_behavior">
    ....

请注意,我已经添加添加android:fillViewport =“true”到nestedScrollView并添加了app:layout_scrollFlags =“scroll”to
ImageView但是当试图从ImageView滚动时没有任何反应.

解决方法

好的,我在错误报告中做了一些研究,这是设计支持库中的一个已知错误.

Check out the bug report here

摘抄

影片

这些显示了当前和预期的行为.这些也来自错误报告.

> https://youtu.be/xWadOVEaTSY
> https://youtu.be/J8ITp6RusZo

大佬总结

以上是大佬教程为你收集整理的android – CollapsingToolbarLayout ImageView不可滚动全部内容,希望文章能够帮你解决android – CollapsingToolbarLayout ImageView不可滚动所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。