将FloatingActionButton的layout_anchor设置为父布局中的元素id

时间:2016-06-08 17:53:43

标签: android android-layout floating-action-button

它可能将FloatingActionButton的app:layout_anchor设置为来自父布局的元素的id?

VIEW_A

<android.support.design.widget.CoordinatorLayout>

    <android.support.design.widget.AppBarLayout
        android:id="@+id/app_bar">                  <--- APP_BAR
        ...
    </android.support.design.widget.AppBarLayout>

    <FrameLayout />                                 <--- VIEW_B

</android.support.design.widget.CoordinatorLayout>

VIEW_B

<LinearLayout>

    <android.support.v4.widget.NestedScrollView>
        ...
    </android.support.v4.widget.NestedScrollView>

    <android.support.design.widget.FloatingActionButton
        app:layout_anchor="@id/app_bar" />          <--- SET APP_BAR

</LinearLayout>

1 个答案:

答案 0 :(得分:0)

不,不是。只需这样做:

%(refname); then printf "%s\n" %(refname); else :; fi;'|/bin/sh -