Bug 1208519 - Add smooth scrolling of item list on range item click. r=sebastian
authorFriedger Müffke <mail@friedger.de>
Mon, 05 Oct 2015 12:58:00 +0200
changeset 266833 b8fc552d066781751368b466cc5e76fd38c43345
parent 266832 c175bf2dfde6e1b98d5c84e3336b8c0aeb985ee3
child 266834 1f1b7e749ffa703eb80ff74943a43894c3be6634
push id15583
push usercbook@mozilla.com
push dateThu, 08 Oct 2015 17:49:09 +0000
treeherderfx-team@b8fc552d0667 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1208519
milestone44.0a1
Bug 1208519 - Add smooth scrolling of item list on range item click. r=sebastian
mobile/android/base/home/HistoryPanel.java
--- a/mobile/android/base/home/HistoryPanel.java
+++ b/mobile/android/base/home/HistoryPanel.java
@@ -142,16 +142,17 @@ public class HistoryPanel extends HomeFr
                     final MostRecentSection rangeItem = (MostRecentSection) adapter.getItemAtPosition(position);
                     if (rangeItem != null) {
                         // Notify data has changed for both range and item adapter.
                         // This will update selected rangeItem item background and the tabs list.
                         // This will also update the selected range along with cursor start and end.
                         selected = rangeItem;
                         mRangeAdapter.notifyDataSetChanged();
                         getLoaderManager().getLoader(LOADER_ID_HISTORY).forceLoad();
+                        mList.smoothScrollToPosition(0);
                     }
                 }
             });
         }
 
         mList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {