Simplifying fast scroller logic
> Using a separate view for drawing the popup. This allows us to use elevation
property instead of drawing the shadow as bitmap.
> During the thumb animation, invalidating the full track width, instead of
invalidating the track and thumb separately.
> The thumb path is calculated at 0,0 and drawn using canvas.translate().
This avoids recalculating the path on every scroll.
Change-Id: I48741e5b4432df0d939016db284d7aaf52cc2aa6
diff --git a/res/layout/all_apps.xml b/res/layout/all_apps.xml
index 9268839..d48bd50 100644
--- a/res/layout/all_apps.xml
+++ b/res/layout/all_apps.xml
@@ -55,6 +55,22 @@
android:focusable="true"
android:theme="@style/CustomOverscroll.Light" />
+ <!-- Fast scroller popup -->
+ <TextView
+ android:background="@drawable/container_fastscroll_popup_bg"
+ android:layout_width="@dimen/container_fastscroll_popup_size"
+ android:layout_height="@dimen/container_fastscroll_popup_size"
+ android:textSize="@dimen/container_fastscroll_popup_text_size"
+ android:layout_below="@+id/search_container"
+ android:id="@+id/fast_scroller_popup"
+ android:layout_alignParentEnd="true"
+ android:gravity="center"
+ android:alpha="0"
+ android:elevation="3dp"
+ android:saveEnabled="false"
+ android:layout_marginEnd="@dimen/container_fastscroll_popup_margin"
+ android:textColor="@android:color/white" />
+
<FrameLayout
android:id="@+id/search_container"
android:layout_width="match_parent"