click here to view image如何可以放置在特定的位置
如何可以放置爲浮動按鈕所示圖像位置的浮動按鈕。下面是我的XML代碼
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.v7.widget.RecyclerView
android:id="@+id/rec_summary_recycler_view_inflow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbarSize="5dp"
android:scrollbars="vertical"
android:scrollbarThumbVertical="@drawable/scr"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:backgroundTint="@color/colorPrimary"
android:src="@drawable/down_arrow"
android:layout_margin="25dp"
app:fabSize="mini"
android:onClick="Scroll" />
刪除當前layout_margin並添加layout_marginBottom =「40dp」 – MrCurious
它去的屏幕 –
的底端再加入marginBottom = 40dp和marginEnd = 40dp,調整根據DP的您的需要 – MrCurious