层叠布局,各个大厂的App使用率还是很高的
布局:
<?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="wrap_content">
<View
android:layout_width="match_parent"
android:layout_height="500dp"
android:background="#5FF"
app:layout_scrollFlags="scroll|enterAlwaysCollapsed" />
<View
android:background="#FF00FF"
android:layout_width="match_par