Files
lawnchair/res/layout/all_apps_fast_scroller.xml
Brandon Dayauon 1f8f88696b Create an alpha letter scroller
- The function used is a raised cosine function to determine the sections to animate.

Tested flag: adb shell device_config put launcher com.android.launcher3.letter_fast_scroller true
Based on recent figmaspec, size of selected letter is 28dp and regular is 20dp. That means scaling should be 28/20.
Colors are:
onSurface for letter
surfaceContainer for background.
Figma shows selected colors are materialColorOnSecondary

bug:358673724
Test manually: https://drive.google.com/file/d/1gvJd5KoK8X_Sv8jXg1cZ65R4AuqHuvcd/view?usp=sharing
Flag: com.android.launcher3.letter_fast_scroller

Change-Id: Ia86eb0e8c41bc043fda3c44aeaf59e204429f337
2024-08-26 11:21:26 -07:00

52 lines
2.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 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.
-->
<merge
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res-auto">
<!-- Fast scroller popup -->
<TextView
android:id="@+id/fast_scroller_popup"
style="@style/FastScrollerPopup"
android:layout_alignParentEnd="true"
android:layout_alignTop="@+id/all_apps_header"
android:layout_marginTop="@dimen/all_apps_header_bottom_padding"
android:layout_marginEnd="@dimen/fastscroll_popup_margin" />
<com.android.launcher3.views.RecyclerViewFastScroller
android:id="@+id/fast_scroller"
android:layout_width="@dimen/fastscroll_width"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignTop="@+id/all_apps_header"
android:layout_marginTop="@dimen/all_apps_header_bottom_padding"
android:layout_marginEnd="@dimen/fastscroll_end_margin"
launcher:canThumbDetach="true" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/scroll_letter_layout"
android:layout_width="@dimen/fastscroll_width"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignTop="@+id/all_apps_header"
android:layout_marginTop="@dimen/all_apps_header_bottom_padding"
android:layout_marginEnd="@dimen/fastscroll_list_letter_end_margin"
android:clipToPadding="false"
android:outlineProvider="none"
/>
</merge>