zoukankan      html  css  js  c++  java
  • app:layout_scrollFlags不起作用

    http://stackoverflow.com/questions/31722798/enteralwayscollapsed-does-not-bring-back-the-toolbar-when-scrolling-down/31946043#31946043

    1.enterAlwaysCollapsed: 当你的视图已经设置minHeight属性又使用此标志时,你的视图只能已最小高度进入,只有当滚动视图到达顶部时才扩大到完整高度

    2. 含有app:layout_scrollFlags的view必须声明在不含该属性的view的布局的前面

     

    Hard to say without seeing your code, as a guess this could be one of two things:


    1.

    enterAlwaysCollapsed - This flag defines how View enter back into the screen. When your view has declared a minHeight and you use this flag, your View will only enter at its minimum height (i.e., ‘collapsed’), only re-expanding to its full height when the scrolling view has reached it’s top. Use it with scroll flag like this: scroll|enterAlwaysCollapsed

    Anyway it seems like it doesn't work as described in minHeight part.

     


    2.

    You have not formatted your code correctly.

    From Android's Developer Blog I quote on "CoordinatorLayout and the app bar":

    One note: all views using the scroll flag must be declared before views that do not use the flag. This ensures that all views exit from the top, leaving the fixed elements behind.

    This link also goes into more detail about how to use enterAlwaysCollapsed and is worth looking at.

  • 相关阅读:
    DDD~大话目录
    基于DDD的.NET开发框架-DDD经典分层
    补习知识:Entity Framework Code First属性映射约定
    一个官翻教程集合:ASP.NET Core 和 EF Core 系列教程
    补知识:EntityFramework Core映射关系详解
    关于this的问题
    promise
    js的类型转换
    不要在块内声明一个函数
    let和var
  • 原文地址:https://www.cnblogs.com/krislight1105/p/5080798.html
Copyright © 2011-2022 走看看