Try this instead of FrameLayout:
<RelativeLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_marginTop="25dp">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="0dp"
android:src="@android:color/transparent"
app:backgroundTint="@color/gray"
android:layout_centerInParent="true"
app:elevation="0dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:elevation="16dp"
android:text="S"
android:textColor="@android:color/white"
android:textSize="10sp" />
</RelativeLayout>
The children of a LinearLayout spread evenly when they have android:layout_width="0dp" and android:layout_weight="1"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…