Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77acf129 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Fixing header jump

Linking header position to an empty entry in the recyclerView,
instead of calculating the vertical scroll position. This
allows the header to be in sync with the recyclerView scroll and
item animations

Other simplifications:
> Moving top collapse handle out of header view (it doesn't scroll)
> Removing background clipping logic from full-sheet
> Moving tab bar inside the header view

Bug: 196464142
Test: Verified on device
Change-Id: Iae5a0ae9af7ce258e1b391b8e85c5c270fe56197
parent 55861dc5
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2021 The Android Open Source Project
<!-- Copyright (C) 2021 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
@@ -14,13 +13,11 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle" >
    <solid android:color="@color/surface" />
    <solid android:color="?android:attr/colorBackground" />
    <corners
        android:topLeftRadius="?android:attr/dialogCornerRadius"
        android:topRightRadius="?android:attr/dialogCornerRadius"
        android:bottomLeftRadius="0dp"
        android:bottomRightRadius="0dp"
        />
        android:topLeftRadius="@dimen/dialogCornerRadius"
        android:topRightRadius="@dimen/dialogCornerRadius" />
</shape>
 No newline at end of file
+0 −29
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape android:shape="rectangle">
            <solid android:color="?android:attr/colorBackground" />
            <padding android:top="16dp"/>
        </shape>
    </item>
    <item android:gravity="center">
        <shape android:shape="rectangle">
            <solid android:color="?android:attr/textColorSecondary" />
            <size android:width="48dp" android:height="2dp" />
        </shape>
    </item>
</layer-list>
 No newline at end of file
+0 −26
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2021 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid android:color="@color/surface" />
    <corners
        android:topLeftRadius="@dimen/default_dialog_corner_radius"
        android:topRightRadius="@dimen/default_dialog_corner_radius"
        android:bottomLeftRadius="0dp"
        android:bottomRightRadius="0dp"
        />
</shape>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
        android:id="@+id/widgets_bottom_sheet"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/widgets_bottom_sheet_background"
        android:background="@drawable/bg_rounded_corner_bottom_sheet"
        android:paddingTop="16dp"
        android:orientation="vertical">
        <View
+14 −4
Original line number Diff line number Diff line
@@ -21,11 +21,19 @@
    android:orientation="vertical"
    android:theme="?attr/widgetsTheme">

    <com.android.launcher3.views.TopRoundedCornerView
    <com.android.launcher3.views.SpringRelativeLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="?android:attr/colorBackground">
        android:background="@drawable/bg_widgets_full_sheet">

        <View
            android:id="@+id/collapse_handle"
            android:layout_width="48dp"
            android:layout_height="2dp"
            android:layout_marginTop="16dp"
            android:layout_centerHorizontal="true"
            android:background="?android:attr/textColorSecondary"/>

        <TextView
            android:id="@+id/no_widgets_text"
@@ -35,6 +43,7 @@
            android:visibility="gone"
            android:fontFamily="sans-serif-medium"
            android:textSize="20sp"
            android:layout_below="@id/search_and_recommendations_container"
            tools:text="No widgets available" />

        <!-- Fast scroller popup -->
@@ -57,9 +66,10 @@
            android:id="@+id/search_widgets_list_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/collapse_handle"
            android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin"
            android:visibility="gone"
            android:clipToPadding="false" />

    </com.android.launcher3.views.TopRoundedCornerView>
    </com.android.launcher3.views.SpringRelativeLayout>
</com.android.launcher3.widget.picker.WidgetsFullSheet>
 No newline at end of file
Loading