我已经尝试过但无法开发如上图所示的相同。下面是我开发的图像。
请告诉我如何进行这样的设计。下面是我的源代码。
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<LinearLayout
android:id="@+id/ll_Nav_header_main"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/side_nav_bar"
android:orientation="vertical"
app:fabCradleMargin="10dp"
app:fabCradleRoundedCornerRadius="10dp"
app:fabCradleVerticalOffset="10dp">
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/nav_header_desc"
android:paddingTop="@dimen/nav_header_vertical_spacing"
app:srcCompat="@mipmap/ic_launcher_round" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:text="@string/nav_header_title"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nav_header_subtitle" />
</LinearLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="40dp"
app:layout_anchor="@id/ll_Nav_header_main"
app:layout_anchorGravity="end|center_vertical"
android:layout_marginStart="80dp"
app:borderWidth="5dp"
android:padding="10dp"
android:background="@color/teal_200"
android:translationX="@dimen/cardview_default_elevation"
android:transformPivotX="@dimen/activity_horizontal_margin"
android:outlineAmbientShadowColor="@color/black"
app:shapeAppearance="@style/Theme.MyApplication.PopupOverlay"
app:srcCompat="@android:drawable/ic_dialog_email" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>