关于悬浮控件

悬浮控件可以用帧布局FrameLayout实现一个布局写主要布局另一个现实悬浮按钮

 

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

            <include layout="@layout/adapter_jzcl_form_rv" />

            <android.support.v7.widget.RecyclerView
                android:id="@+id/rc_table"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
        </LinearLayout>

        <ImageView
            android:id="@+id/ib_gotop"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:layout_gravity="bottom|right"
            android:layout_margin="5dp"
            android:background="@mipmap/bun_gotop" />
    </FrameLayout>

    <View
        android:id="@+id/fl_liuhai"
        android:layout_width="match_parent"
        android:layout_height="0dp" />
</LinearLayout>

关于悬浮控件