FitSystemWindowLayout icon indicating copy to clipboard operation
FitSystemWindowLayout copied to clipboard

toolbar 包裹在 AppBarLayout ,toobar 还是在上面。

Open wuchangfeng opened this issue 9 years ago • 2 comments

你好。当 toolbar 包裹在 AppBarLayout 中时,如你所说的那样设置,toolbar 仍然还是在上面。不知道是不是哪里没有设置什么?
<android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/AppTheme.AppBarOverlay">

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="?attr/colorPrimary"
        android:minHeight="?actionBarSize"
        app:margin_status="true" />
    <android.support.design.widget.TabLayout
        android:id="@+id/tab_layout"
        app:tabIndicatorColor="#FFFFFF"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
    </android.support.design.widget.TabLayout>
</android.support.design.widget.AppBarLayout>

wuchangfeng avatar Jun 27 '16 02:06 wuchangfeng

估计是在AppBarlayout中设置app:margin_status="true"吧

minyangcheng avatar Jun 29 '16 07:06 minyangcheng

是对FitSystemXXLayout的直接子View进行设置,就是你这里的AppBarLayout,不是一定要Toolbar。 ...对于自定义LayoutParams来说,根本就不可能跨级设置吧。

Jude95 avatar Jun 29 '16 07:06 Jude95