Latest UX asset drop.

Darker action bar overflow icon, larger grid-mode directory icon,
icon for music albums, generic file icon.

Fix bug that allowed null MIME types to be picked.

Bug: 10700025
Change-Id: I2089678eaf793bc3c7214b21c9de5f38429ebb0f
This commit is contained in:
Jeff Sharkey
2013-09-18 18:03:49 -07:00
parent e20a3acdc2
commit 563ee0fbe9
52 changed files with 37 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 847 B

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 836 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 819 B

After

Width:  |  Height:  |  Size: 866 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 884 B

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 973 B

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -16,6 +16,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="Theme" parent="@android:style/Theme.Holo.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>

View File

@@ -29,5 +29,12 @@
<!-- Normally just a redirection, but this is used to make ourselves a
dialog on large tablets -->
<style name="Theme" parent="@android:style/Theme.Holo.Light" />
<style name="Theme" parent="@android:style/Theme.Holo.Light">
<item name="android:actionOverflowButtonStyle">@style/DarkerOverflow</item>
</style>
<style name="DarkerOverflow" parent="@android:style/Widget.Holo.Light.ActionButton.Overflow">
<item name="android:src">@drawable/ic_menu_overflow</item>
</style>
</resources>

View File

@@ -781,7 +781,8 @@ public class DirectoryFragment extends Fragment {
iconMime.setImageDrawable(
IconUtils.loadPackageIcon(context, docAuthority, docIcon));
} else {
iconMime.setImageDrawable(IconUtils.loadMimeIcon(context, docMimeType));
iconMime.setImageDrawable(IconUtils.loadMimeIcon(
context, docMimeType, docAuthority, docId, state.derivedMode));
}
}

View File

@@ -22,6 +22,7 @@ import android.content.pm.ProviderInfo;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.provider.DocumentsContract.Document;
import android.util.Log;
import com.google.android.collect.Maps;
@@ -206,6 +207,27 @@ public class IconUtils {
return null;
}
public static Drawable loadMimeIcon(
Context context, String mimeType, String authority, String docId, int mode) {
final Resources res = context.getResources();
if (Document.MIME_TYPE_DIR.equals(mimeType)) {
// TODO: eventually move these hacky assets into that package
if ("com.android.providers.media.documents".equals(authority)
&& docId.startsWith("album")) {
return res.getDrawable(R.drawable.ic_doc_album);
}
if (mode == DocumentsActivity.State.MODE_GRID) {
return res.getDrawable(R.drawable.ic_grid_folder);
} else {
return res.getDrawable(R.drawable.ic_root_folder);
}
}
return loadMimeIcon(context, mimeType);
}
public static Drawable loadMimeIcon(Context context, String mimeType) {
final Resources res = context.getResources();
@@ -236,8 +258,7 @@ public class IconUtils {
} else if ("video".equals(typeOnly)) {
return res.getDrawable(R.drawable.ic_doc_video);
} else {
// TODO: generic icon?
return null;
return res.getDrawable(R.drawable.ic_doc_generic);
}
}
}

View File

@@ -80,10 +80,10 @@ public class MimePredicate implements Predicate<DocumentInfo> {
}
public static boolean mimeMatches(String filter, String test) {
if (filter == null || "*/*".equals(filter)) {
return true;
} else if (test == null) {
if (test == null) {
return false;
} else if (filter == null || "*/*".equals(filter)) {
return true;
} else if (filter.equals(test)) {
return true;
} else if (filter.endsWith("/*")) {