summaryrefslogtreecommitdiffstats
path: root/src/com/android/dialer/list/SpeedDialFragment.java
diff options
context:
space:
mode:
authorBrian Attwell <brianattwell@google.com>2014-09-22 14:17:11 -0700
committerBrian Attwell <brianattwell@google.com>2014-09-23 10:51:56 -0700
commit764f652b451d27282cfaf73407d31c9522e6cb0e (patch)
treee6f2a19c5863ab197bb2f5bcb3fc64fb5dcd540a /src/com/android/dialer/list/SpeedDialFragment.java
parentf2d3bd5d0fc9fd8e28f440fce7489691e0aee46b (diff)
downloadandroid_packages_apps_Dialer-764f652b451d27282cfaf73407d31c9522e6cb0e.tar.gz
android_packages_apps_Dialer-764f652b451d27282cfaf73407d31c9522e6cb0e.tar.bz2
android_packages_apps_Dialer-764f652b451d27282cfaf73407d31c9522e6cb0e.zip
Improve scrolling, handle onNestedPreFling
This contains three main changes. 1 Carry momentum from flings in the header into the ListView. 2 The header now snaps into a semi collapsed state more often then it used to 3 The current scrolling direction is now a larger factor in deciding where the header position will snap to upon finishing a scroll I coupled ViewDragHelper a bit closer to OverlappingPaneLayout. At first I tried to avoid this. But I think this was a wasted effort. ViewDragHelper is specifically forked for OverlappingPaneLayout. Some behaviors I made sure to test manually: 1 When expanding/collapsing the header the direction of motion should determine where the header snaps to upon release. 2 Collapsing from fully open to intermediate (not previously possible) 3 Drag tabs up/down regardless of whether at top of ListView or not (unchanged) 4 Dragging and releasing the tabs should cause the same sort of snapping behavior as scrolling and releasing the nested ListView (this still isn't exactly the same. I don't think this is important enough to dig into more) 5 After fully expanding the header by grabbing on the tabs, you can collapse the header normally via nested scrolling. 6 Scroll down the ListView. Then expand the header by dragging the tabs. Now scroll up and down in the ListView a bit. 7 Quickly fling up, down, up, down, up, down, up, down, up, down. Should feel the same as scrolling a regular ListView. 8 Fling upwards, stop the fling prematurly then release. The header shouldn't do anything (fixing this was a matter of adding a scroll slop). Bug: 16462679 Change-Id: I272a838885ce9045d41aaef1168b0ee0a32ee31d
Diffstat (limited to 'src/com/android/dialer/list/SpeedDialFragment.java')
-rw-r--r--src/com/android/dialer/list/SpeedDialFragment.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/dialer/list/SpeedDialFragment.java b/src/com/android/dialer/list/SpeedDialFragment.java
index 9732e19b3..c02c3d7f9 100644
--- a/src/com/android/dialer/list/SpeedDialFragment.java
+++ b/src/com/android/dialer/list/SpeedDialFragment.java
@@ -420,4 +420,8 @@ public class SpeedDialFragment extends AnalyticsFragment implements OnItemClickL
public void cacheOffsetsForDatasetChange() {
saveOffsets(0);
}
+
+ public AbsListView getListView() {
+ return mListView;
+ }
}