This is necessary to prevent UI thrash (items continually shuffling
around) when the underlying Provider doesn't return its contents in a
stable order from one load event to another (DownloadStorageProvider is
an example).
BUG=26417297
Change-Id: Ie99e56b610f5d01d5318be07c0379b506c828735
The shift-selection code was failing to correctly anchor the selection
prior to shifting focus. This meant that the first shift-navigation
event (i.e. starting from non-selection mode) would not select the right
set of stuff.
BUG=26459949
Change-Id: I62ed959fb549198c503cfd2131d2499f9a61f7e5
The divider is extraneous when a directory contains only subdirs, or
only files. The "only dirs" case works (the divider is omitted) but in
the case where a directory contains only files, a divider gets inserted
at position 0, which messes up navigation. This change adds code to
avoid adding a divider when a directory contains only files.
BUG=26406821
Change-Id: I7333911baf94e34bf428a3dd18b55694a73e3a62
- Add a new checkmark icon.
- Modify the grid and list items to include the check icon in the
appropriate location.
- Add code to various DocumentHolder subclasses to cross-fade between
icons when things are selected/deselected.
- Create new dimensions quantities to represent new icon sizes.
- Clean up xml files.
BUG=24326546
Change-Id: Ib3f04c8274d35ac3b95ed13730df340e8b7c36c6
Make the service operation agnostic, so we can also move delete operations to it.
In a followup change we'll see about adding support for multiple concurrent
operations. We'll need to evaluate how to do this in IntentService (which
serializes requests....a major limitation).
Change-Id: I03eca9c1ecaba519af42d88edffeb0dce78bd1da
To be compatible with ContentProvider, DocumentsProvider should not
require checking for a flag before calling openTypedAssetFile.
This CL removes the flag, and makes the default implementation throw
FileNotFoundException instead.
Bug: 26222645
Change-Id: I3492f05804e39583ebb8584109c7017b3082846e
Smooth scrolling fires off a full complement of scroll state changes,
which enables the code to more accurately detect when a scroll is
finished.
BUG=24865658,25632648
Change-Id: Ib902836fdb4a76612d3bbfc4d30d5b0b249301a5
- Add code to restore the mime icon on grid tiles (previously removed
while tile layouts were being worked on).
- Switch mime icons from pngs to vector drawables.
BUG=24326989
Change-Id: I38b54256c6eca79052decadb6d138f658d03b951
This is needed to handle removable roots.
1. Add a listener to RootCache.
2. BaseActivity handles roots change and leaves from the current
directory if the current root is removed.
BUG=26316940
Change-Id: I41921fe17782fa1a2d9e58f55ea84326b8f1d3c0
We were bouncing calls out to the adapter pulled from RecyclerView,
but the adapter is easy to write a test double for and
we can readily inject the adapter when needed at runtime.
Eliminates unnecessary indirection.
Also, protect against failure when documents can't be loaded for delete.
Change-Id: Ief6585bf2e3e4fd407d801d485a9d7cd888b8500
This fixes:
- UI to show selection which was broken in ag/838866
- Delete undo, which throws IOB exception
when undoing a a full delete of all entries.
Change-Id: Idbb43510974e130d283313602a71ac15ad10aadf
Move section break support into a separate wrapper class.
Fix issue where intermediate directory updates were briefly showing hidden files.
Add a rudimentary test for ModelBackedDocumentsAdapter.
Bug: 26293561, 26383237, 26293561, 26309025
Change-Id: I1fa489b110754d8801091b2009caebe9d2278701
DialogFragment takes care of recreation on configuration change, so no
need to recreate it manually.
Bug: 26322214
Change-Id: I7c50a1c5bb1ba9fab34f6e8d31ed1e23e7edfbb7
- Guard against OutOfBoundsExceptions by checking for
RecyclerView.NO_POSITION before attempting to retrieve model IDs in
various places.
- Fix a spot where the default return value of
SparseIntArray.get (i.e. 0) was causing item 0 to incorrectly get
selected.
BUGS=26249027,26309874
Change-Id: I08d2e8c90bdd40a4738bdcf357de31e8fe6ddecf