More DocumentsUI material iteration.

Move to using Toolbar for all actions.  Drawer contains its own
Toolbar with separate title, and hamburger is always visible.  Change
drawer items to match spec.  Switching to Toolbar allows us to remove
nasty dialog-on-tablet hacks, yay!  This also means we can finally
get real IME resizing support.

Move to using elevation for all shadows; this removes more nasty
hacks around drawing directory shadows.

Bug: 15836082
Change-Id: Iba70b898f385a7debd8aabfc98ff39d20bca860d
diff --git a/res/drawable-hdpi/ic_dir_shadow_am.9.png b/res/drawable-hdpi/ic_dir_shadow_am.9.png
index 904d525..d4ffd45 100644
--- a/res/drawable-hdpi/ic_dir_shadow_am.9.png
+++ b/res/drawable-hdpi/ic_dir_shadow_am.9.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_dir_shadow_am.9.png b/res/drawable-mdpi/ic_dir_shadow_am.9.png
index 068619b..4a81b6b 100644
--- a/res/drawable-mdpi/ic_dir_shadow_am.9.png
+++ b/res/drawable-mdpi/ic_dir_shadow_am.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_dir_shadow_am.9.png b/res/drawable-xhdpi/ic_dir_shadow_am.9.png
index e38a868..f387132 100644
--- a/res/drawable-xhdpi/ic_dir_shadow_am.9.png
+++ b/res/drawable-xhdpi/ic_dir_shadow_am.9.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_dir_shadow_am.9.png b/res/drawable-xxhdpi/ic_dir_shadow_am.9.png
index 0b332e4..c475e47 100644
--- a/res/drawable-xxhdpi/ic_dir_shadow_am.9.png
+++ b/res/drawable-xxhdpi/ic_dir_shadow_am.9.png
Binary files differ
diff --git a/res/drawable/item_activated.xml b/res/drawable/item_activated.xml
index 6ffefdb..1b3f44a 100644
--- a/res/drawable/item_activated.xml
+++ b/res/drawable/item_activated.xml
@@ -15,7 +15,11 @@
 -->
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_focused="true" android:state_activated="true" android:drawable="@color/accent_item_activated" />
-    <item android:state_focused="false" android:state_activated="true" android:drawable="@color/accent_item_activated" />
+    <item android:state_focused="true" android:state_activated="true">
+        <color android:color="?android:attr/colorAccent" />
+    </item>
+    <item android:state_focused="false" android:state_activated="true">
+        <color android:color="?android:attr/colorAccent" />
+    </item>
     <item android:drawable="@android:color/transparent" />
 </selector>
diff --git a/res/drawable/item_root.xml b/res/drawable/item_activated_overlay.xml
similarity index 73%
rename from res/drawable/item_root.xml
rename to res/drawable/item_activated_overlay.xml
index 60d4ab0..83e4d7e 100644
--- a/res/drawable/item_root.xml
+++ b/res/drawable/item_activated_overlay.xml
@@ -15,8 +15,11 @@
 -->
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_pressed="true" android:drawable="@color/item_root_pressed" />
-    <item android:state_activated="true" android:drawable="@color/item_root_focused" />
-    <item android:state_focused="true" android:drawable="@color/item_root_focused" />
+    <item android:state_focused="true" android:state_activated="true">
+        <color android:color="@color/accent_color_overlay" />
+    </item>
+    <item android:state_focused="false" android:state_activated="true">
+        <color android:color="@color/accent_color_overlay" />
+    </item>
     <item android:drawable="@android:color/transparent" />
 </selector>
diff --git a/res/layout-sw720dp-land/item_doc_list.xml b/res/layout-sw720dp-land/item_doc_list.xml
index 5f1e432..95af7e9 100644
--- a/res/layout-sw720dp-land/item_doc_list.xml
+++ b/res/layout-sw720dp-land/item_doc_list.xml
@@ -17,7 +17,7 @@
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:foreground="@drawable/item_activated">
+    android:background="@drawable/item_activated">
 
     <LinearLayout
         android:layout_width="match_parent"
diff --git a/res/layout-sw720dp/activity.xml b/res/layout-sw720dp/activity.xml
index 9286277..4e97f8c 100644
--- a/res/layout-sw720dp/activity.xml
+++ b/res/layout-sw720dp/activity.xml
@@ -17,44 +17,59 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:orientation="horizontal"
-    android:baselineAligned="false">
+    android:orientation="vertical">
 
-    <FrameLayout
-        android:layout_width="wrap_content"
-        android:layout_height="match_parent"
-        android:id="@+id/dialog_roots">
+    <Toolbar
+        android:id="@+id/toolbar"
+        android:layout_width="match_parent"
+        android:layout_height="?android:attr/actionBarSize"
+        android:background="?android:attr/colorPrimary"
+        android:elevation="8dp"
+        android:theme="?android:attr/actionBarTheme">
+
+        <Spinner
+            android:id="@+id/stack"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="4dp"
+            android:overlapAnchor="true" />
+
+    </Toolbar>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:orientation="horizontal"
+        android:baselineAligned="false">
 
         <FrameLayout
             android:id="@+id/container_roots"
             android:layout_width="250dp"
             android:layout_height="match_parent" />
 
-        <ImageView
-            android:layout_width="wrap_content"
+        <LinearLayout
+            android:layout_width="0dp"
             android:layout_height="match_parent"
-            android:layout_gravity="end"
-            android:scaleType="fitXY"
-            android:src="@drawable/ic_drawer_shadow_tablet" />
+            android:layout_weight="1"
+            android:orientation="vertical"
+            android:elevation="8dp"
+            android:background="@*android:color/material_grey_50">
 
-    </FrameLayout>
+            <com.android.documentsui.DirectoryContainerView
+                android:id="@+id/container_directory"
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="1" />
 
-    <LinearLayout
-        android:layout_width="0dp"
-        android:layout_height="match_parent"
-        android:layout_weight="1"
-        android:orientation="vertical">
+            <FrameLayout
+                android:id="@+id/container_save"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="@*android:color/material_grey_50"
+                android:elevation="8dp" />
 
-        <com.android.documentsui.DirectoryContainerView
-            android:id="@+id/container_directory"
-            android:layout_width="match_parent"
-            android:layout_height="0dp"
-            android:layout_weight="1" />
-
-        <FrameLayout
-            android:id="@+id/container_save"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content" />
+        </LinearLayout>
 
     </LinearLayout>
 
diff --git a/res/layout/activity.xml b/res/layout/activity.xml
index 2ef7e9c..3ba82e1 100644
--- a/res/layout/activity.xml
+++ b/res/layout/activity.xml
@@ -24,6 +24,23 @@
         android:layout_height="match_parent"
         android:orientation="vertical">
 
+        <Toolbar
+            android:id="@+id/toolbar"
+            android:layout_width="match_parent"
+            android:layout_height="?android:attr/actionBarSize"
+            android:background="?android:attr/colorPrimary"
+            android:elevation="8dp"
+            android:theme="?android:attr/actionBarTheme">
+
+            <Spinner
+                android:id="@+id/stack"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="4dp"
+                android:overlapAnchor="true" />
+
+        </Toolbar>
+
         <com.android.documentsui.DirectoryContainerView
             android:id="@+id/container_directory"
             android:layout_width="match_parent"
@@ -33,15 +50,35 @@
         <FrameLayout
             android:id="@+id/container_save"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content" />
+            android:layout_height="wrap_content"
+            android:background="@*android:color/material_grey_50"
+            android:elevation="8dp" />
 
     </LinearLayout>
 
-    <FrameLayout
-        android:id="@+id/container_roots"
+    <LinearLayout
+        android:id="@+id/drawer_roots"
         android:layout_width="250dp"
         android:layout_height="match_parent"
         android:layout_gravity="start"
-        android:background="#fff" />
+        android:orientation="vertical"
+        android:elevation="16dp"
+        android:background="@*android:color/white">
+
+        <Toolbar
+            android:id="@+id/roots_toolbar"
+            android:layout_width="match_parent"
+            android:layout_height="?android:attr/actionBarSize"
+            android:background="?android:attr/colorPrimary"
+            android:elevation="8dp"
+            android:theme="?android:attr/actionBarTheme" />
+
+        <FrameLayout
+            android:id="@+id/container_roots"
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="1" />
+
+    </LinearLayout>
 
 </android.support.v4.widget.DrawerLayout>
diff --git a/res/layout/fragment_directory.xml b/res/layout/fragment_directory.xml
index 09b50c0..ffbd3f0 100644
--- a/res/layout/fragment_directory.xml
+++ b/res/layout/fragment_directory.xml
@@ -17,7 +17,7 @@
 <com.android.documentsui.DirectoryView xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@drawable/ic_dir_shadow">
+    android:background="@*android:color/material_grey_50">
 
     <TextView
         android:id="@android:id/empty"
diff --git a/res/layout/fragment_pick.xml b/res/layout/fragment_pick.xml
index 4a2fd03..5735871 100644
--- a/res/layout/fragment_pick.xml
+++ b/res/layout/fragment_pick.xml
@@ -17,32 +17,16 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical">
+    android:orientation="horizontal"
+    android:baselineAligned="false"
+    android:gravity="center_vertical"
+    android:minHeight="?android:attr/listPreferredItemHeightSmall">
 
-    <!-- Le sigh, this really should be an asset -->
-    <View
+    <Button
+        android:id="@android:id/button1"
         android:layout_width="match_parent"
-        android:layout_height="1dp"
-        android:background="#ccc" />
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:baselineAligned="false"
-        android:gravity="center_vertical"
-        android:background="#ddd"
-        android:minHeight="?android:attr/listPreferredItemHeightSmall">
-
-        <Button
-            android:id="@android:id/button1"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="?android:attr/selectableItemBackground"
-            android:textAppearance="?android:attr/textAppearanceSmall"
-            android:textAllCaps="false"
-            android:padding="8dp" />
-
-    </LinearLayout>
+        android:layout_height="match_parent"
+        android:textAllCaps="false"
+        style="?android:attr/buttonBarPositiveButtonStyle" />
 
 </LinearLayout>
diff --git a/res/layout/fragment_roots.xml b/res/layout/fragment_roots.xml
index c3a3da0..2d624d8 100644
--- a/res/layout/fragment_roots.xml
+++ b/res/layout/fragment_roots.xml
@@ -18,4 +18,5 @@
     android:id="@android:id/list"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:divider="@drawable/ic_drawer_hairline_divider" />
+    android:paddingTop="8dp"
+    android:divider="@null" />
diff --git a/res/layout/fragment_save.xml b/res/layout/fragment_save.xml
index d601194..7aac620 100644
--- a/res/layout/fragment_save.xml
+++ b/res/layout/fragment_save.xml
@@ -17,66 +17,55 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical">
+    android:paddingStart="@dimen/list_item_padding"
+    android:orientation="horizontal"
+    android:baselineAligned="false"
+    android:gravity="center_vertical"
+    android:minHeight="?android:attr/listPreferredItemHeightSmall">
 
-    <!-- Le sigh, this really should be an asset -->
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="1dp"
-        android:background="#ccc" />
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:baselineAligned="false"
-        android:gravity="center_vertical"
-        android:background="#ddd"
-        android:minHeight="?android:attr/listPreferredItemHeightSmall">
+    <FrameLayout
+        android:layout_width="@dimen/icon_size"
+        android:layout_height="@dimen/icon_size"
+        android:layout_marginEnd="16dp">
 
         <ImageView
             android:id="@android:id/icon"
-            android:layout_width="24dp"
-            android:layout_height="24dp"
-            android:layout_marginStart="8dp"
-            android:layout_marginEnd="8dp"
+            android:layout_width="@dimen/root_icon_size"
+            android:layout_height="match_parent"
             android:scaleType="centerInside"
             android:contentDescription="@null" />
 
-        <EditText
-            android:id="@android:id/title"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:singleLine="true"
-            android:selectAllOnFocus="true" />
+    </FrameLayout>
 
-        <FrameLayout
+    <EditText
+        android:id="@android:id/title"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:singleLine="true"
+        android:selectAllOnFocus="true" />
+
+    <FrameLayout
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent">
+
+        <Button
+            android:id="@android:id/button1"
             android:layout_width="wrap_content"
-            android:layout_height="match_parent">
+            android:layout_height="match_parent"
+            android:text="@string/menu_save"
+            style="?android:attr/buttonBarPositiveButtonStyle" />
 
-            <Button
-                android:id="@android:id/button1"
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:background="?android:attr/selectableItemBackground"
-                android:text="@string/menu_save"
-                android:textAllCaps="true"
-                android:textAppearance="?android:attr/textAppearanceSmall"
-                android:padding="8dp" />
+        <ProgressBar
+            android:id="@android:id/progress"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:visibility="gone"
+            android:indeterminate="true"
+            android:padding="8dp"
+            style="?android:attr/progressBarStyle" />
 
-            <ProgressBar
-                android:id="@android:id/progress"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center"
-                android:visibility="gone"
-                android:indeterminate="true"
-                android:padding="8dp"
-                style="?android:attr/progressBarStyle" />
-
-        </FrameLayout>
-
-    </LinearLayout>
+    </FrameLayout>
 
 </LinearLayout>
diff --git a/res/layout/item_doc_grid.xml b/res/layout/item_doc_grid.xml
index 0fc606d..4482d72 100644
--- a/res/layout/item_doc_grid.xml
+++ b/res/layout/item_doc_grid.xml
@@ -19,7 +19,7 @@
     android:layout_height="@dimen/grid_item_height"
     android:orientation="vertical"
     android:background="@color/grid_item_background"
-    android:foreground="@drawable/item_activated">
+    android:foreground="@drawable/item_activated_overlay">
 
     <ImageView
         android:id="@+id/icon_thumb"
diff --git a/res/layout/item_doc_list.xml b/res/layout/item_doc_list.xml
index 50ed2d6..c5f1842 100644
--- a/res/layout/item_doc_list.xml
+++ b/res/layout/item_doc_list.xml
@@ -17,7 +17,7 @@
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:foreground="@drawable/item_activated">
+    android:background="@drawable/item_activated">
 
     <LinearLayout
         android:layout_width="match_parent"
diff --git a/res/layout/item_root.xml b/res/layout/item_root.xml
index f17c261..266b9b0 100644
--- a/res/layout/item_root.xml
+++ b/res/layout/item_root.xml
@@ -17,25 +17,33 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:minHeight="?android:attr/listPreferredItemHeightSmall"
-    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+    android:minHeight="48dp"
+    android:paddingStart="@dimen/list_item_padding"
+    android:paddingEnd="@dimen/list_item_padding"
     android:gravity="center_vertical"
     android:orientation="horizontal"
     android:baselineAligned="false"
-    android:background="@drawable/item_root">
+    android:background="@drawable/item_activated">
 
-    <ImageView
-        android:id="@android:id/icon"
+    <FrameLayout
         android:layout_width="@dimen/icon_size"
         android:layout_height="@dimen/icon_size"
-        android:layout_marginEnd="8dp"
-        android:scaleType="centerInside"
-        android:contentDescription="@null" />
+        android:layout_marginEnd="16dp">
+
+        <ImageView
+            android:id="@android:id/icon"
+            android:layout_width="@dimen/root_icon_size"
+            android:layout_height="match_parent"
+            android:scaleType="centerInside"
+            android:contentDescription="@null" />
+
+    </FrameLayout>
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:paddingTop="8dp"
+        android:paddingBottom="8dp"
         android:orientation="vertical">
 
         <TextView
@@ -45,7 +53,8 @@
             android:singleLine="true"
             android:ellipsize="end"
             android:textAlignment="viewStart"
-            style="@style/TextAppearance.Medium" />
+            android:textAppearance="@android:style/TextAppearance.Material.Body1"
+            android:textColor="?android:attr/textColorPrimary" />
 
         <TextView
             android:id="@android:id/summary"
@@ -54,7 +63,8 @@
             android:singleLine="true"
             android:ellipsize="end"
             android:textAlignment="viewStart"
-            style="@style/TextAppearance.Small" />
+            android:textAppearance="@android:style/TextAppearance.Material.Body1"
+            android:textColor="?android:attr/textColorSecondary" />
 
     </LinearLayout>
 
diff --git a/res/layout/item_root_spacer.xml b/res/layout/item_root_spacer.xml
index 7d96ac8..b3beced 100644
--- a/res/layout/item_root_spacer.xml
+++ b/res/layout/item_root_spacer.xml
@@ -14,7 +14,15 @@
      limitations under the License.
 -->
 
-<View xmlns:android="http://schemas.android.com/apk/res/android"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:background="@drawable/ic_drawer_tall_divider" />
+    android:paddingTop="8dp"
+    android:paddingBottom="8dp">
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="?android:attr/listDivider" />
+
+</FrameLayout>
diff --git a/res/layout/item_title.xml b/res/layout/item_subdir.xml
similarity index 87%
rename from res/layout/item_title.xml
rename to res/layout/item_subdir.xml
index 6e96fb5..b2a739a 100644
--- a/res/layout/item_title.xml
+++ b/res/layout/item_subdir.xml
@@ -28,6 +28,7 @@
         android:id="@+id/subdir"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
+        android:paddingEnd="8dp"
         android:scaleType="centerInside"
         android:visibility="gone"
         android:src="@drawable/ic_subdirectory_arrow"
@@ -35,11 +36,13 @@
 
     <TextView
         android:id="@android:id/title"
-        android:layout_width="match_parent"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
+        android:layout_weight="1"
         android:singleLine="true"
         android:ellipsize="middle"
         android:textAlignment="viewStart"
-        style="@style/TextAppearance.Medium" />
+        android:textAppearance="@android:style/TextAppearance.Material.Subhead"
+        android:textColor="?android:attr/textColorPrimary" />
 
 </LinearLayout>
diff --git a/res/layout/item_title.xml b/res/layout/item_subdir_title.xml
similarity index 63%
copy from res/layout/item_title.xml
copy to res/layout/item_subdir_title.xml
index 6e96fb5..4c839d0 100644
--- a/res/layout/item_title.xml
+++ b/res/layout/item_subdir_title.xml
@@ -15,31 +15,19 @@
 -->
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
+    android:layout_width="wrap_content"
     android:layout_height="wrap_content"
-    android:minHeight="?android:attr/listPreferredItemHeightSmall"
-    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
-    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
-    android:gravity="center_vertical"
+    android:paddingEnd="8dp"
     android:orientation="horizontal"
     android:baselineAligned="false">
 
-    <ImageView
-        android:id="@+id/subdir"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:scaleType="centerInside"
-        android:visibility="gone"
-        android:src="@drawable/ic_subdirectory_arrow"
-        android:contentDescription="@null" />
-
     <TextView
         android:id="@android:id/title"
-        android:layout_width="match_parent"
+        android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:singleLine="true"
         android:ellipsize="middle"
         android:textAlignment="viewStart"
-        style="@style/TextAppearance.Medium" />
+        android:textAppearance="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title" />
 
 </LinearLayout>
diff --git a/res/values-sw720dp/dimens.xml b/res/values-sw720dp/dimens.xml
index 75afe01..068c806 100644
--- a/res/values-sw720dp/dimens.xml
+++ b/res/values-sw720dp/dimens.xml
@@ -21,7 +21,7 @@
     <item type="dimen" name="dialog_height">90%</item>
 
     <dimen name="grid_padding_horiz">24dp</dimen>
-    <dimen name="grid_padding_vert">8dp</dimen>
+    <dimen name="grid_padding_vert">16dp</dimen>
 
     <dimen name="grid_item_padding">8dp</dimen>
 
diff --git a/res/values-sw720dp/styles.xml b/res/values-sw720dp/styles.xml
deleted file mode 100644
index 8d31444..0000000
--- a/res/values-sw720dp/styles.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
-    <style name="Theme" parent="@android:style/Theme.DeviceDefault.Light">
-        <item name="android:actionOverflowButtonStyle">@style/DarkerOverflow</item>
-        <item name="android:windowBackground">@*android:drawable/dialog_full_holo_light</item>
-        <item name="android:colorBackgroundCacheHint">@null</item>
-        <item name="android:windowIsTranslucent">true</item>
-        <item name="android:windowAnimationStyle">@*android:style/Animation.DeviceDefault.Dialog</item>
-    </style>
-</resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index e3d7f2d..08159c4 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -15,12 +15,10 @@
 -->
 
 <resources>
-    <color name="chip">#ddd</color>
-    <color name="item_root_pressed">#33cccccc</color>
-    <color name="item_root_focused">#66cccccc</color>
 
-    <color name="grid_item_background">#ffe1e1e0</color>
+    <!-- Half-alpha of material_teal_500 -->
+    <color name="accent_color_overlay">#8800bcd4</color>
 
-    <color name="accent_item_activated">#88009587</color>
+    <color name="grid_item_background">@*android:color/material_grey_300</color>
 
 </resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 83a0bf4..d4d7ede 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -37,4 +37,6 @@
     <bool name="show_as_dialog">false</bool>
     <bool name="always_show_summary">false</bool>
 
+    <dimen name="dir_elevation">8dp</dimen>
+
 </resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index a416eb4..4bd6991 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -15,6 +15,29 @@
 -->
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <style name="DocumentsTheme" parent="@android:style/Theme.DeviceDefault.Light.DialogWhenLarge">
+        <item name="android:actionBarWidgetTheme">@null</item>
+        <item name="android:actionBarTheme">@*android:style/ThemeOverlay.Material.Dark.ActionBar</item>
+        <item name="android:actionBarPopupTheme">@*android:style/ThemeOverlay.Material.Light</item>
+
+        <item name="android:colorPrimaryDark">@*android:color/material_blue_grey_900</item>
+        <item name="android:colorPrimary">@*android:color/material_blue_grey_800</item>
+        <item name="android:colorAccent">@*android:color/material_teal_500</item>
+
+        <item name="android:windowActionBar">false</item>
+        <item name="android:windowNoTitle">true</item>
+
+        <item name="*android:windowFixedWidthMajor">@null</item>
+        <item name="*android:windowFixedWidthMinor">@null</item>
+        <item name="*android:windowMinWidthMajor">@null</item>
+        <item name="*android:windowMinWidthMinor">@null</item>
+        <item name="*android:windowFixedHeightMajor">80%</item>
+        <item name="*android:windowFixedHeightMinor">90%</item>
+
+        <item name="android:windowSoftInputMode">stateUnspecified|adjustUnspecified</item>
+    </style>
+
     <style name="TextAppearance" />
 
     <style name="TextAppearance.Medium">
@@ -27,14 +50,4 @@
         <item name="android:textColor">?android:attr/textColorTertiary</item>
     </style>
 
-    <!-- Normally just a redirection, but this is used to make ourselves a
-         dialog on large tablets -->
-    <style name="Theme" parent="@android:style/Theme.DeviceDefault.Light">
-        <item name="android:actionOverflowButtonStyle">@style/DarkerOverflow</item>
-    </style>
-    
-    <style name="DarkerOverflow" parent="@android:style/Widget.DeviceDefault.Light.ActionButton.Overflow">
-        <item name="android:src">@drawable/ic_menu_overflow</item>
-    </style>
-
 </resources>