Commit Graph

915 Commits

Author SHA1 Message Date
Ben Kwa
b0fed2b72e Merge "Embiggen the progress bar." 2016-01-12 21:56:39 +00:00
Ben Kwa
a66cebde23 Embiggen the progress bar.
BUG=26159818

Change-Id: I12a33be503dd29d03cb85b814b287879c016275d
2016-01-12 13:36:44 -08:00
Steve McKay
76be620a6f Grid view padding + explicit background.
Also move section break holder into the wrapper class.

Change-Id: I949e81af180f11514aff558615cfeda44cb96a3c
2016-01-12 11:41:26 -08:00
Steve McKay
da161f0b17 Merge "Fix bug where both list and grid buttons are visible." 2016-01-11 23:33:00 +00:00
Aga Wronska
d3b8e52009 Merge "Keep Search View visible after search completed Improve Search View behavior Add Search View background color" 2016-01-11 23:05:43 +00:00
Aga Wronska
97831485e7 Keep Search View visible after search completed
Improve Search View behavior
Add Search View background color

Bug:26143355
Change-Id: Ifdc4bfff56fc6244c571dfbeff4179e1515d53b7
2016-01-11 14:58:18 -08:00
Ben Kwa
22f5fce70b Merge "Move the "home" root below the divider." 2016-01-11 17:38:30 +00:00
Ben Kwa
e95c321fd9 Move the "home" root below the divider.
BUG=26143357

Change-Id: Ia48aa141f265aa3b1b6a07ec966dc9da6d283de3
2016-01-08 17:24:59 -08:00
Ben Kwa
d20d01061c Merge "Increase the stability of sorting in the Model." 2016-01-09 01:05:06 +00:00
Ben Kwa
e2564f9f19 Increase the stability of sorting in the Model.
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
2016-01-08 16:59:20 -08:00
Steve McKay
7c7e684b78 Fix bug where both list and grid buttons are visible.
Bug: 26456290
Change-Id: I41d97d7ce33a193b6a9591609deadf9690b00ba7
2016-01-08 14:59:56 -08:00
Ben Kwa
53aaec12bc Merge "Hide the divider in list mode." 2016-01-08 22:57:28 +00:00
Ben Kwa
90bf9f5f28 Hide the divider in list mode.
BUG=26399570

Change-Id: I5013bf9ae80c003419f3f22dcf2a7e6787c19711
2016-01-08 13:31:11 -08:00
Ben Kwa
433df5c865 Merge "Fix home key behaviour when there are no subdirs in cwd." 2016-01-08 20:58:24 +00:00
Ben Kwa
2ad8214916 Merge "Fix shift-selection." 2016-01-08 20:57:40 +00:00
Ben Kwa
2613802d4b Fix shift-selection.
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
2016-01-08 12:56:10 -08:00
Ben Kwa
f5ce1035d4 Fix home key behaviour when there are no subdirs in cwd.
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
2016-01-08 11:36:55 -08:00
Ben Kwa
2e8bafc38b Merge "Add checkmark icons for selection." 2016-01-08 17:06:29 +00:00
Daichi Hirono
3360de1ea8 Merge "Fix document stack." 2016-01-08 05:34:59 +00:00
Daichi Hirono
7f34b20a70 Fix document stack.
We need to add document to stack by using 'push' method instead of 'add'
method.

BUG=26437613

Change-Id: I3e4ac6b0d03cacbe2d6cdd93443ce1c96c8c47d9
2016-01-08 14:33:11 +09:00
Ben Kwa
ddc3d21ef9 Add checkmark icons for selection.
- 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
2016-01-07 19:05:32 -08:00
Steve McKay
8c83d3304a Merge "CopyService generalization." 2016-01-08 02:40:34 +00:00
Daichi Hirono
3b36c5a10b Encapsulate stackTouched logic into State class.
BUG=26437613

Change-Id: I84a667cb3561d395daac4e63d9eaca589c8f1fea
2016-01-08 11:26:46 +09:00
Steve McKay
14e827a958 CopyService generalization.
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
2016-01-07 16:29:36 -08:00
Tomasz Mikolajewski
4b6ac4a359 Merge "Revert "Revert "Remove the flag and make openTypedDocument throw FileNotFoundException.""" 2016-01-07 07:19:56 +00:00
Tomasz Mikolajewski
75395651c2 Revert "Revert "Remove the flag and make openTypedDocument throw FileNotFoundException.""
This reverts commit 2b93171978.

Change-Id: Ic61b874012daeada02b73643f5c58f9ec840b3e5
2016-01-07 07:19:22 +00:00
Tomasz Mikolajewski
97dd67cc34 Merge "Revert "Remove the flag and make openTypedDocument throw FileNotFoundException."" 2016-01-07 04:47:42 +00:00
Tomasz Mikolajewski
2b93171978 Revert "Remove the flag and make openTypedDocument throw FileNotFoundException."
This reverts commit 95149ab6a5.

Change-Id: I218aa8059ef674400dac8531a86cd326748c26d5
2016-01-07 04:47:03 +00:00
Tomasz Mikolajewski
5a22e1a19d Merge "Remove the flag and make openTypedDocument throw FileNotFoundException." 2016-01-07 03:52:01 +00:00
Tomasz Mikolajewski
95149ab6a5 Remove the flag and make openTypedDocument throw FileNotFoundException.
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
2016-01-07 03:49:14 +00:00
Daichi Hirono
1830c2aa55 Merge "Leave from the current root when the root is removed." 2016-01-07 01:18:34 +00:00
Ben Kwa
4788b3392c Merge "Switch to smooth scrolling when zooming to home/end." 2016-01-06 21:44:43 +00:00
Ben Kwa
8d7bf9487b Switch to smooth scrolling when zooming to home/end.
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
2016-01-06 13:41:58 -08:00
Ben Kwa
91430f1adf Reinstate mime icons on grid tiles.
- 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
2016-01-06 12:15:49 -08:00
Geoff Mendal
41a324ebea Import translations. DO NOT MERGE
Change-Id: Icd9c16ad1f8cad8f53a99a1b7a4d7ca73510881d
Auto-generated-cl: translation import
2016-01-06 05:20:03 -08:00
Daichi Hirono
60e9a07557 Leave from the current root when the root is removed.
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
2016-01-06 13:32:39 +09:00
Tomasz Mikolajewski
7e6040d981 Merge "Set the default mode to grid view." 2016-01-06 02:45:56 +00:00
Steve McKay
44408260ba Don't proxy calls to DocumentsAdapter in MultiSelManager.
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
2016-01-05 15:50:35 -08:00
Steve McKay
955e46d004 Fix event relay to correctly dispatch events.
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
2016-01-05 14:13:57 -08:00
Steve McKay
eceac1b1e3 Merge "Move Adapters to their own classes." 2016-01-05 19:29:46 +00:00
Steve McKay
ef16f5f411 Move Adapters to their own classes.
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
2016-01-05 10:50:52 -08:00
Aga Wronska
7587fd0094 Change Internal Storage icon from sdcard to smartphone
Bug:26143658
Change-Id: I7663a477c8e90e89f8f5dbed1b6f2c1f83e929d1
2016-01-04 12:53:18 -08:00
Tomasz Mikolajewski
5351e3f4fb Set the default mode to grid view.
Bug: 26329660
Change-Id: I2445e39dde02549e1f3ca4461558129918aa4bb7
2015-12-28 17:57:30 +09:00
Tomasz Mikolajewski
aa684454f8 Prevent double recreation of the failure dialog in DocumentsUI.
DialogFragment takes care of recreation on configuration change, so no
need to recreate it manually.

Bug: 26322214
Change-Id: I7c50a1c5bb1ba9fab34f6e8d31ed1e23e7edfbb7
2015-12-25 18:22:52 +09:00
Geoff Mendal
8dd3dbae67 Import translations. DO NOT MERGE
Change-Id: Ib6ebdd5bbdb5d5186533ca875ed0d2f69e31f7c1
Auto-generated-cl: translation import
2015-12-23 05:18:27 -08:00
Ben Kwa
ff491d6b36 Merge "Adjust grid margins to match mocks." 2015-12-23 01:13:03 +00:00
Ben Kwa
2f6553f0f0 Merge "Fix various band select instabilities." 2015-12-23 01:11:33 +00:00
Ben Kwa
a108e7e426 Merge "Update grid items to look more like the mocks." 2015-12-23 01:11:12 +00:00
Ben Kwa
cd41fb837d Adjust grid margins to match mocks.
BUG=25560424

Change-Id: I11edfd9585299acb22ca14b518274ae2538a7d01
2015-12-22 17:09:24 -08:00
Ben Kwa
20887030e8 Fix various band select instabilities.
- 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
2015-12-22 15:27:14 -08:00