Java 工具栏使用图像重叠从曲线滚动到法线
我正在尝试创建如下布局: 我有这个布局,但问题是背景不透明,我如何添加重叠的圆形图像?我的意思是像一个圆圈,在我想要的图像视图中Java 工具栏使用图像重叠从曲线滚动到法线,java,android,android-layout,kotlin,Java,Android,Android Layout,Kotlin,我正在尝试创建如下布局: 我有这个布局,但问题是背景不透明,我如何添加重叠的圆形图像?我的意思是像一个圆圈,在我想要的图像视图中 <?xml version="1.0" encoding="utf-8"?> <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android&
<?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="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="150dp"
android:background="@drawable/curve_toolbar_bg"
android:theme="@style/AppTheme.AppBarOverlay">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar_qr_creator"
android:layout_width="match_parent"
android:layout_height="100dp"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</com.google.android.material.appbar.AppBarLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
编辑
要实现的是,当我滚动这个工具栏时,它变成一条没有曲线的直线,然后imageView在工具栏中保持相同的覆盖,或者如果可能的话,在右边添加
我的工具栏现在看起来像图像,但我不得不删除CordinateLayout和appBarLayout,但我想现在我不能继续这样做,因为我无法控制滚动
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar_create_qr"
android:layout_width="match_parent"
android:layout_height="150dp"
android:background="@drawable/curve_toolbar"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:theme="@style/ThemeOverlay.AppCompat.Dark" />
<View
android:id="@+id/view"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@drawable/circle_shape"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/toolbar_create_qr"
app:layout_constraintVertical_bias="0.15" />
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar_create_qr"
android:layout_width="match_parent"
android:layout_height="150dp"
android:background="@drawable/curve_toolbar"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:theme="@style/ThemeOverlay.AppCompat.Dark" />
<View
android:id="@+id/view"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@drawable/circle_shape"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/toolbar_create_qr"
app:layout_constraintVertical_bias="0.15" />