悬浮控件可以用帧布局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>

关于悬浮控件

 

相关文章:

  • 2021-11-11
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
  • 2021-11-27
猜你喜欢
  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
  • 2022-02-25
  • 2021-11-30
相关资源
相似解决方案