From 5326d42438048443209a4e957e003693390fd12d Mon Sep 17 00:00:00 2001 From: Eric House Date: Mon, 29 Jan 2018 05:33:48 -0800 Subject: [PATCH] enable smart scrolling Otherwise it takes too long to scroll if you have hundreds of games. To make this work had to move scroller to left side of games list display as otherwise the scroller steals events from the expander thingies. --- .../main/java/org/eehouse/android/xw4/GamesListDelegate.java | 3 +++ xwords4/android/app/src/main/res/layout/game_list.xml | 1 + 2 files changed, 4 insertions(+) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java index 41ffeeaea..b2b09d385 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java @@ -972,6 +972,9 @@ public class GamesListDelegate extends ListDelegateBase mkListAdapter(); getListView().setOnItemLongClickListener( this ); + // Only works if scroller's on left side, as it otherwise steals + // events from the expander arrow things + getListView().setFastScrollEnabled( true ); NetUtils.informOfDeaths( m_activity ); diff --git a/xwords4/android/app/src/main/res/layout/game_list.xml b/xwords4/android/app/src/main/res/layout/game_list.xml index 5cd43b19b..55aaa4d74 100644 --- a/xwords4/android/app/src/main/res/layout/game_list.xml +++ b/xwords4/android/app/src/main/res/layout/game_list.xml @@ -12,6 +12,7 @@ android:layout_height="fill_parent" android:layout_weight="1" android:drawSelectorOnTop="false" + android:verticalScrollbarPosition="left" />