99 Commits

Author SHA1 Message Date
Ben Kwa
2084796e23 Merge "DocsUI: Update the drag shadow to meet UI spec." into nyc-dev 2016-04-06 15:02:04 +00:00
Ben Kwa
e67b0bdf5a DocsUI: Update the drag shadow to meet UI spec.
BUG=27608249

Change-Id: If10f842be4507c5f04e2e91dadcae842610388f2
2016-04-05 15:49:51 -07:00
Aga Wronska
78efc9f3d2 Revert "Revert "Make status bar translucent. Make drawer appera below
status bar."" with a fix for cts tests.

This reverts commit 0574d169ba1e649d8bd54d28ba74b9707e675e37.

Change-Id: I33deeef839092956a67ec31bcdbfbbd540db8b68
2016-03-23 14:47:47 -07:00
Daichi Hirono
c545f5e617 Fix the directory item height in grid view.
BUG=27565668

Change-Id: I3d5615b46542dcd0f22f5e9968d3ee5bfe1af19a
2016-03-23 16:35:32 +09:00
Felipe Leme
493611f541 Polished Scoped Directory Access UI.
- Set proper style on custom alert dialog view.
- Fixed padding.
- Removed redundant style.
- Fixed checkbox color.

BUG: 26750152

Change-Id: Ibf3984e1b0a092affc58f1377b89b6ab7ea2a3aa
2016-03-15 16:56:15 -07:00
Felipe Leme
adccb9950e Add a "Do not ask again" checkbox.
When an app request access to a scoped directory which the user already
denied access, it will display a "Do not ask again" checkbox; if the
user checks that option, further requests will be automatically
rejected.

The history of denials is stored in the shared property file.

The UI is not polished yet, the style will be fixed in a future change.

BUG: 26750152

Change-Id: I181923adfb6a1c7c1c17e305d6838314280417fc
2016-03-15 11:12:53 -07:00
Steve McKay
ce71082254 Centralize animation related resources.
Fix minor bug in animation (use height not width).

Change-Id: I357224086b2732fe9ad49a145db3e82259a87891
2016-03-11 13:50:03 -08:00
Steve McKay
df72a43218 Make disabled items look disabled.
Update app to use color-selectors for item text.

Bug: 27246583
Change-Id: I2ba0b89e4640b987da248957f8ba5e6760d1b21d
2016-03-09 09:51:19 -08:00
Steve McKay
67f50e64e0 Make delete dialog match spec.
Bug: 27535181
Change-Id: Icd2347003747b4e7674048f632dbe47a1607f8b2
2016-03-08 09:25:24 -08:00
Aga Wronska
4730beb85c Changed breadcrumb arrow to match mocks
Bug: 27136601
Change-Id: I03b3d789c1edf8de7f3d92238045cca123ce5e72
2016-03-04 16:12:38 -08:00
Aga Wronska
b6db022312 Made breadcrumb drop down match mocks
Bug: 27136601
Change-Id: I93af07a45defaddd7f5785fac8b686984a889583
2016-03-04 14:05:39 -08:00
Steve McKay
8db100e4a3 Merge "Don't show title in delete confirmation." into nyc-dev 2016-03-02 19:56:21 +00:00
Ben Kwa
f8d6fa2c5a Merge "Tweak root item layouts." into nyc-dev 2016-03-02 19:39:06 +00:00
Steve McKay
c8d4e22a72 Don't show title in delete confirmation.
Also, remove "unhide" from Adapter, since it is unused.
Had to add a custom layout because Alert didn't do a
    good job. LOTS of work for a yes/no!

Bug: 27205772
Change-Id: Ic20d73b54fd142287e07402877ac339300b4bbb7
2016-03-01 12:46:29 -08:00
Steve McKay
8b8a6fd193 Ensure directory names are aligned correctly...
In list view...and don't show dir dates, even when present.
In fact, no details on folders at all when in list view.
Also improve layout of files without details (if they exist).

Bug: 27406730
Change-Id: Ida4b5f99666c4a145ca98a3c15c480e59a76b4a6
2016-03-01 11:49:21 -08:00
Ben Kwa
ec76030999 Tweak root item layouts.
- Make stuff line up better.
- Visually distinguish root names from their descriptions.

BUG=26793290

Change-Id: Ibb050b205b7dc69415c736486bc3b7deef0b0767
2016-02-26 13:29:00 -08:00
Steve McKay
da48a9aa07 Only ellipsize at end of strings.
Bug: 27339484, 27338617
Change-Id: I5e908c862cf9d6a2ba0c7552434914f18fbab716
2016-02-24 12:59:32 -08:00
Steve McKay
e2af078488 UX cleanups.
Visually separate directory background from sidebar.
Lower shadows so the "real" effect isn't so prominent.

Hitchhikders:
Consolidate bool values in config.xml files (were in dimens.xml).
Add missing supportsRecents & supportsSearch methods
    to RootInfo.
Rename RecentLoader to RecentsLoader so it doesn't defy
    searching for "Recents" string.
Move Downloads below the divider.

Change-Id: I06c76e26ec6df6541860a1448865c67ed953ed43
2016-02-18 22:21:03 +00:00
Aga Wronska
d4b1753170 Fix focus issues in directory fragment
* Empty directory view gets focus when shown
    * Skip opening drawer when showing empty search results
    * Fix typo

Bug: 27109140
Change-Id: Ie62d48e1c3f78e5244d88067587b3e5986f99a03
2016-02-16 10:15:24 -08:00
Ben Kwa
2036dad877 Introduce ChromeOS-style keyboard navigation.
- Turn the DirectoryFragment (DF) and the RootsFragment (RF) into
  top-level views, and allow switching between them via the tab key.

- Disallow arrow-key navigation from switching the user between the
  DF and RF.

- When nothing is explicitly focused, make navigation keys focus the
  DF.  This makes it so that if a user opens DocumentsUI and just starts
  pressing arrow keys, they'll navigate in the directory listing.

- When restoring focus on the DF and RF, remember the last thing that
  was focused, and restore focus on that thing.

BUG=25195767
BUG=25121367

Change-Id: I00e20cbdbe9edfe269fb356440a93ef5d67c5298
(cherry picked from commit 1c9f9222e56482682461013b703590c5c9471018)
2016-02-11 14:16:04 +00:00
Ben Kwa
fabd228168 Update the subdir icon to svg.
BUG=21705832

Change-Id: I400b5402c0efd34d79be3e8b05b2154dd8c48735
(cherry picked from commit 032c283ef32f72d038b8a989366b184d68ccfd0e)
2016-02-10 15:14:27 +00:00
Tomasz Mikolajewski
eb33c0a53f Cleanup sliding animation between directories.
The shadow is restored + redundant fade removed.

Bug: 26986946
Change-Id: I31dde7d03f60be470e1c5e06dcdce828d3e4eaa0
(cherry picked from commit 3134ddf99d4215041ed749f3b4e682a1910d208e)
2016-02-09 09:20:53 +00:00
Tomasz Mikolajewski
3d911ea095 Fix animation for the empty cabinet, also make other animations less jarring.
Setting android:animateLayoutChanges=true was causing flickering and problems
with sliding the cabinet while a fragment transition was already in progress.

Bug: 27060052
Bug: 26952361
Change-Id: I17e5f8b57d63cd9a586fc70ae43e030c4f232e8d
(cherry picked from commit ed82fd784301c645cb665517edc3006888d6f237)
2016-02-09 09:16:53 +00:00
Tomasz Mikolajewski
5bfdf2b39a Remove DirectoryContainerView class from DocumentsUI.
Removed and it works as before, I guess it was some workaround for a bug
in the past.

Change-Id: I859c995940ad04ac028aea1727a81358ca7fda1b
2016-02-05 09:50:02 +09:00
Steve McKay
c67aacc76f Merge "Normalize toolbar management." 2016-02-04 04:20:55 +00:00
Steve McKay
1f264a8a1a Normalize toolbar management.
Since it was almost all redundant (especially the stack stuff).
Ensure "Files" title present on drawer title in Files app.
DocumentsToolBar > DocumentsToolbar to match toolkit naming.

Bug: 26193264
Change-Id: I92c82c66d936aae3ce0f792581daa12898dfadee
2016-02-03 17:59:06 -08:00
Ben Kwa
e3aee18dc9 Lint fixes and config tweaks.
- Add recommended ignore properties to lint.xml.
- Make Fragment subclasses public.
- Truncate log tags at 23 chars.
- Fix one instance of passing a color ID instead of a color.
- Misc xml property fixes.

Change-Id: Ie8d6a8932cda72b7a239f6dfab56bd854f909820
2016-02-03 09:09:40 -08:00
Ben Kwa
70921871ba Temporarily fix directory tile heights in grid mode.
BUG=26760493

Change-Id: I118e30cdf3892ef6857735f4a4f69a128b3f1c36
2016-01-26 10:08:24 -08:00
Aga Wronska
31f97bc4ee Merge "Add support for renaming documents" 2016-01-22 23:26:35 +00:00
Aga Wronska
3b327ef9f9 Add support for renaming documents
- Add rename dialog
- Add rename menu option
- Enable rename menu option only when renaming supported
- Rename files and directories
- Present error message if renaming fails

Bug: 20493815
Change-Id: Ic7386d14e3876655fb19245b9a90b4c67a4febb4
2016-01-22 13:36:40 -08:00
Steve McKay
9ed88a4da7 Show empty file cabinet for no search results.
And for empty directory.

Magic-submit? Yes please!

Change-Id: If9e1f8ab48eebd9c275ad043da728e28b850ab73
2016-01-22 11:59:16 -08:00
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
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
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
Ben Kwa
f8a51f6fcb Update grid items to look more like the mocks.
- Create a new layout for directory items, which have a different
  layout (no thumbnail, size or mod_date).

- Add drop shadows.

Also refactor a few things in the DocumentHolder and child classes to
make things more efficient and cleaner.

BUG=24326989,26229570

Change-Id: I05df52b071667190d4c4c671f50d25498383cdaa
2015-12-22 14:40:21 -08:00
Ben Kwa
d27906e581 Tweak grid item layout. Adjust colors to match spec.
BUG=10960718
BUG=24326989

Change-Id: I74da23fe0b40d713a3f435d1467d26d707e76fca
2015-11-19 10:50:35 -08:00
Ben Kwa
9094585eb4 Adjust grid item layouts to match mocks.
BUG=24326989

Change-Id: I8a4133890036a2ef9173f20828f062a7e991525d
2015-11-10 20:32:17 -08:00
Ben Kwa
38e94747e7 Clean up/fix some minor focus-related code.
- Cleanup: Set the focusable flag in xml rather than in java.
- Add a border for the currently focused item in grid mode.

BUG=24326989

Change-Id: Ib17e93c377fb6b16bf8a7eccfb213f521d9596f0
2015-11-05 11:31:21 -08:00
Steve McKay
5aacf1fdbd Show only selection count in ActionBar.
According to mocks.
Also, remove padding on RecyclerView.

Bug: 24542381
Change-Id: I8abfa96020fb457641605dc184079de92f8b265b
2015-10-27 16:54:16 -07:00
Ben Kwa
d7915d2ab2 Fix a DocsUI crash due to a misnamed xml reference.
BUG=25266394

Change-Id: I06bd3283e52467af3ebb43396d4166b3c25620a9
2015-10-26 11:54:41 -07:00
Ben Kwa
bd96456d11 Implement enter key support for DocumentsUI.
- Add a click handler that basically handles all cases (including the
  enter key) of Items being clicked.
- Open the focused file in non-select mode, toggle selection if in
  selection mode.
- Remove now-redundant onSingleTapUp handlers.
- Redo focus indicator, since it's now possible to toggle selection on
  the focused file.
- Don't dismiss selection on arrow-key navigation.

BUG=24705453
BUG=25114155

Change-Id: Iba74188514ecf2bc6b56573087e3c3ccc83f85d2
2015-10-20 14:53:12 -07:00
Steve McKay
d20f87dad8 Rename "recyclerView" to "list" fixing some of CTS.
Bug: 24544391
Change-Id: I2ca74e2a007ec733092d4cb3f84b40c64392c766
2015-10-10 15:53:26 +00:00
Ben Kwa
94b486d32c Switch DocumentsUI over from Toasts to Snackbars.
Add a new top-level CoordinatorLayout to ensure proper operation of the
snackbar.
Switch all Toast code over to use Snackbar.

BUG=24474629

Change-Id: Iafffb35be6115cbac9304fd44e77e73b6be40c17
2015-09-30 14:47:55 -07:00
Ben Kwa
91bec536ac DocumentsUI: Add an error screen to DirectoryFragment.
- Reorganize the directory fragment.
- Repurpose the "empty" view to hold a message and a button.
- Message is set to the "No items" message if a directory is empty.
- Message is set to the error message if a query error occurs.
- Don't close DocumentsUI when a query error occurs.

Change-Id: I4e1e96f23040606b410ac746252dcb0ab9286f04
2015-09-24 15:06:14 -07:00
Steve McKay
c643386e28 Update RecentsCreateView to use RecyclerView.
Move common DirectoryContainerView handling to BaseActivity.

Change-Id: I2c34b23b7050b68999f16e6d7f651c94ea8e47b6
2015-09-22 15:58:15 -07:00
Ben Kwa
91caed80b1 Restore more missing DirectoryFragment functionality.
- Add a material-style horizontal progress bar to DocumentsUI.  This
  replaces the old loading footer.
- Restore the view-switching code that displayed a dedicated "empty"
  view when displaying an empty directory.
- Fix tests.

Change-Id: Ifecb867f6edecbdeb37b8607d87d9797879a589d
2015-09-22 13:24:51 -07:00
Ben Kwa
3b19e31e18 Replace error/info footers with a message bar.
- Remove footers from DirectoryFragment.
- Add a new MessageBar fragment that can display error/info messages.

BUG=22638983

Change-Id: I2075ae8e4dca8954a09c1fc57ed62bb6d3bff7a9
2015-09-18 13:53:41 -07:00
Ben Kwa
0f7078f004 Refactor DocsUI to break out a new ManageRootActivity.
- Split all ACTION_MANAGE-related functionality off from
  DocumentsActivity, into a new activity.
- Create new full-screen layouts for said activity.
- Fix some styling issues in {Documents,Files}Activity.

Change-Id: I0384715ad3c7d70a3a3daf510f1a09e8c5732348
2015-09-11 13:58:41 -07:00