summaryrefslogtreecommitdiffstats
path: root/packages/DocumentsUI
diff options
context:
space:
mode:
Diffstat (limited to 'packages/DocumentsUI')
-rw-r--r--packages/DocumentsUI/res/layout/activity.xml2
-rw-r--r--packages/DocumentsUI/res/layout/item_doc_grid.xml6
-rw-r--r--packages/DocumentsUI/res/values/cm_colors.xml23
-rw-r--r--packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java6
4 files changed, 31 insertions, 6 deletions
diff --git a/packages/DocumentsUI/res/layout/activity.xml b/packages/DocumentsUI/res/layout/activity.xml
index 32431e3..3de76d0 100644
--- a/packages/DocumentsUI/res/layout/activity.xml
+++ b/packages/DocumentsUI/res/layout/activity.xml
@@ -63,7 +63,7 @@
android:layout_gravity="start"
android:orientation="vertical"
android:elevation="16dp"
- android:background="@*android:color/white">
+ android:background="@color/drawer_background_color">
<Toolbar
android:id="@+id/roots_toolbar"
diff --git a/packages/DocumentsUI/res/layout/item_doc_grid.xml b/packages/DocumentsUI/res/layout/item_doc_grid.xml
index d62d050..90938ae 100644
--- a/packages/DocumentsUI/res/layout/item_doc_grid.xml
+++ b/packages/DocumentsUI/res/layout/item_doc_grid.xml
@@ -66,7 +66,7 @@
android:ellipsize="middle"
android:textAlignment="viewStart"
android:textAppearance="@android:style/TextAppearance.Material.Subhead"
- android:textColor="@*android:color/primary_text_default_material_dark" />
+ android:textColor="@color/font_color_doc_grid" />
<ImageView
android:id="@android:id/icon1"
@@ -95,7 +95,7 @@
android:ellipsize="end"
android:textAlignment="viewStart"
android:textAppearance="@android:style/TextAppearance.Material.Caption"
- android:textColor="@*android:color/primary_text_default_material_dark" />
+ android:textColor="@color/font_color_doc_grid" />
<TextView
android:id="@+id/size"
@@ -107,7 +107,7 @@
android:ellipsize="end"
android:textAlignment="viewStart"
android:textAppearance="@android:style/TextAppearance.Material.Caption"
- android:textColor="@*android:color/primary_text_default_material_dark" />
+ android:textColor="@color/font_color_doc_grid" />
<ImageView
android:id="@android:id/icon2"
diff --git a/packages/DocumentsUI/res/values/cm_colors.xml b/packages/DocumentsUI/res/values/cm_colors.xml
new file mode 100644
index 0000000..1fa1a80
--- /dev/null
+++ b/packages/DocumentsUI/res/values/cm_colors.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 The CyanogenMod 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>
+
+ <!-- adding new exposed theme components -->
+ <color name="drawer_background_color">#ffffffff</color>
+ <color name="font_color_doc_grid">#ffffffff</color>
+
+</resources>
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java
index 0d326ec..9a86c8e 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/DirectoryFragment.java
@@ -530,8 +530,10 @@ public class DirectoryFragment extends Fragment {
for (int i = 0; i < size; i++) {
if (checked.valueAt(i)) {
final Cursor cursor = mAdapter.getItem(checked.keyAt(i));
- final DocumentInfo doc = DocumentInfo.fromDirectoryCursor(cursor);
- docs.add(doc);
+ if (cursor != null) {
+ final DocumentInfo doc = DocumentInfo.fromDirectoryCursor(cursor);
+ docs.add(doc);
+ }
}
}