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.

  • 相关阅读:
    sql count中加条件
    zero-copy总结
    问题诊断神器arthas
    rabbitmq 消息确认
    HttpRunner安装笔记(1)安装环境准备:pyenv安装
    centos7 安装rabbitmq3.4.1-1
    centos7 python2.7.5 升级python3.6.4
    测试面试必会sql(1)
    mysql5.6 无法远程连接问题解决
    Katalon 学习笔记(一)
  • 原文地址:https://www.cnblogs.com/krislight1105/p/5080798.html
Copyright © 2011-2022 走看看