【问题标题】:Can anyone explain me about "app:layout_behavior="@string/appbar_scrolling_view_behavior"?谁能解释一下“app:layout_behavior="@string/appbar_scrolling_view_behavior”?
【发布时间】:2018-06-16 04:06:01
【问题描述】:

谁能解释一下这个属性"app:layout_behavior="@string/appbar_scrolling_view_behavior"

【问题讨论】:

标签: android xml android-layout


【解决方案1】:

更改android.support.constraint.ConstraintLayout ✖android.support.design.widget.CoordinatorLayout ✓ 那么子元素可以使用app:layout_behavior

【讨论】:

    【解决方案2】:

    如果您使用CoordinatorLayout,您可以使用布局行为,例如在滚动列表时隐藏FloatingActionButton 或在滚动列表时隐藏工具栏。您询问的行为用于第二种情况,应在触发工具栏滚动的视图上设置此行为。此字符串资源包含定义行为的类名。您也可以创建自定义行为。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-04-07
      • 2015-12-21
      • 2015-11-23
      • 2013-05-23
      • 2017-07-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多