android – 如何在recyclelerView向下滚动时折叠后隐藏工具栏

如何在recyclelerView向下滚动时折叠后隐藏工具栏,在recyclelerView向上滚动时显示工具栏,并在列表末尾展开CollapsingToolbarLayout?现在,CollapsingToolbarLayout只会崩溃,工具栏会在滚动时显示所有时间.

stemWindows="true"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        stemWindows="true"
            android:minHeight="@dimen/actionBarHeight"
            app:contentScrim="@color/colorPrimary"
            app:expandedTitleTextAppearance="@style/TransparentText"
            app:layout_scrollFlags="scroll|exitUntilCollapsed">

            teralwaysCollapsed"
                app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>

        ravity="bottom"
            app:layout_scrollFlags="scroll" />

    
最佳答案
这应该完美.在API 17中测试并使用

stemWindows="true"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:context=".activity.CareersActivity"
    xmlns:tools="http://schemas.android.com/tools">

    stemWindows="true"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        stemWindows="true"
            app:contentScrim="?attr/colorPrimary"
            app:layout_scrollFlags="scroll|enteralways|enteralwaysCollapsed">

            stemWindows="true"
                app:layout_collapseMode="parallax"
                android:src="@drawable/placeholder"/>

            stemWindows="true"
                app:titleTextColor="@color/main_color_white"
                app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
                app:layout_collapseMode="pin"/>

        

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...