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.

  • 相关阅读:
    读书笔记——读《构建之法:现代软件工程》第13~17章
    读《构建之法》十一,十二章有感
    男神女神配 社区交友网 —— 之 主页 详细解说
    典型用户和场景
    最终版本
    用户调研
    第9-11组总体评价
    第二次sprint
    读《构建之法》8-10章
    第一个Sprint
  • 原文地址:https://www.cnblogs.com/krislight1105/p/5080798.html
Copyright © 2011-2022 走看看