OSDN Git Service

Convert start menu from GridView to RecyclerView
[android-x86/packages-apps-Taskbar.git] / app / src / main / res / layout / tb_start_menu_top_right.xml
index 14a5188..8e58ef9 100644 (file)
         android:layout_height="wrap_content"
         android:padding="1dp" >
 
-        <GridView
-            android:id="@+id/start_menu"
+        <android.support.v7.widget.RecyclerView
+            android:id="@+id/start_menu_fast_scroll"
             android:layout_width="@dimen/tb_start_menu_width"
             android:layout_height="@dimen/tb_start_menu_height"
             android:background="?tb_start_menu_background"
             android:listSelector="@null"
-            android:clickable="false" />
+            android:clickable="false"
+            app:fastScrollEnabled="true"
+            app:fastScrollHorizontalThumbDrawable="@drawable/tb_thumb_drawable"
+            app:fastScrollHorizontalTrackDrawable="@drawable/tb_line_drawable"
+            app:fastScrollVerticalThumbDrawable="@drawable/tb_thumb_drawable"
+            app:fastScrollVerticalTrackDrawable="@drawable/tb_line_drawable"/>
+
+        <android.support.v7.widget.RecyclerView
+            android:id="@+id/start_menu_no_fast_scroll"
+            android:layout_width="@dimen/tb_start_menu_width"
+            android:layout_height="@dimen/tb_start_menu_height"
+            android:background="?tb_start_menu_background"
+            android:listSelector="@null"
+            android:clickable="false"
+            android:scrollbars="vertical" />
 
         <TextView
             android:id="@+id/no_apps_found"