OSDN Git Service

Implement PgUp/PgDn support. (cherry-pick DO NOT MERGE)
authorBen Kwa <kenobi@google.com>
Wed, 3 Feb 2016 07:00:02 +0000 (23:00 -0800)
committerBen Kwa <kenobi@google.com>
Tue, 9 Feb 2016 18:06:11 +0000 (18:06 +0000)
commit1e2fa5e79fb5240cca20105508c2f7a49f8005b6
tree7892d63b21b0fba3e7742d69f062472345100081
parentccdd08d37cc2b95da22941cc8fe80488d5d498e5
Implement PgUp/PgDn support.  (cherry-pick DO NOT MERGE)

- Clean up our LayoutManager code.  We actually only need a single
  layout manager, since a GridLayoutManager is a LinearLayoutManager,
  and list layout is simply grid layout with one column.  Make it so.

- Use the layout manager to compute item offsets for one page's worth of
  items.  Use that to implement page up/page down.

BUG=25195770

Change-Id: I23ddd5fd38532682e7f099b44e188d8c3fec02be
(cherry picked from commit 4d4bf9a21a16bae3497f94dbb558a2ede9d989ee)
packages/DocumentsUI/src/com/android/documentsui/Events.java
packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
packages/DocumentsUI/src/com/android/documentsui/dirlist/DocumentsAdapter.java