Fix ManageApplications pinned header overlaps content

A best UX is to hide pinned header when scrolling up
and show pinned header when scrolling down. It needs
CoordinatorLayout and CoordinatorLayout.Behavior to
control the expected UX.

However, we have an outer CoordinatorLayout in
CollapsingToolbarBaseActivity, if we use CoordinatorLayout
here, the inner one will not pass scroll value to its
parent. We will have no overscroll effect problem and
tool bar no collapsed problem.

This workaround draw pinned header at last and
assign background color to cover content.

Bug: 187376670
Test: manual visual
      Settings -> Notifications -> App Settings
      Settings > Apps > all apps
Change-Id: I217fba917d11f63d954369c18e0361112ff981fe
This commit is contained in:
Arc Wang
2021-06-28 15:13:14 +08:00
parent e8de94a21d
commit b4e96b1223

View File

@@ -20,13 +20,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/pinned_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="2dp"
settings:layout_constraintTop_toTopOf="parent"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/apps_list"
android:layout_width="match_parent"
@@ -57,5 +50,12 @@
settings:layout_constraintTop_toBottomOf="@id/pinned_header"
settings:layout_constraintBottom_toBottomOf="parent"/>
<FrameLayout
android:id="@+id/pinned_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground"
settings:layout_constraintTop_toTopOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>