【发布时间】:2019-12-05 18:26:16
【问题描述】:
代码:
<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:id="@+id/appBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:backgroundTint="@android:color/transparent"
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|enterAlwaysCollapsed">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:backgroundTint="@android:color/transparent"
app:contentScrim="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlwaysCollapsed"
app:titleEnabled="false">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</com.google.android.material.appbar.CollapsingToolbarLayout>
<com.github.florent37.arclayout.ArcLayout
android:layout_width="match_parent"
android:layout_height="90dp"
android:background="@android:color/transparent"
app:arc_cropDirection="cropOutside"
app:arc_height="30dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary" />
</com.github.florent37.arclayout.ArcLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView
android:id="@+id/vkiscrollview"
android:layout_width="match_parent"
android:layout_height="604dp"
android:background="@color/darkblue"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:visibility="gone"
android:backgroundTint="@color/transparent">
CONTENT....
</RelativeLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
我想删除图像中看到的背景(在弧形布局灰色背景色下).. 每个地方的背景颜色都不是透明的。 我想在我的项目或弧形 ETC 中使用弧形布局。上面所有的代码都是我写的。还有,如何绘制像弧形布局这样的xml形状?
它不会尝试一切。请帮帮我
提前谢谢..
【问题讨论】: