summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2010-09-17 11:33:58 -0700
committerMichael Kolb <kolby@google.com>2010-09-22 17:55:59 -0700
commitfa3140719411322b678f1bd998ac1bac961047e0 (patch)
treed1347a491f0a9719bcf151face8f846a9619b1a6 /src
parent8a9619369d681651b8231e48c8cdefc003383ad4 (diff)
downloadpackages_apps_Browser-fa3140719411322b678f1bd998ac1bac961047e0.zip
packages_apps_Browser-fa3140719411322b678f1bd998ac1bac961047e0.tar.gz
packages_apps_Browser-fa3140719411322b678f1bd998ac1bac961047e0.tar.bz2
added bookmarks folder icon
Change-Id: I34765961c29afa711f4d4e3f8f7fa9fca13753c6
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/BrowserBookmarksAdapter.java22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/com/android/browser/BrowserBookmarksAdapter.java b/src/com/android/browser/BrowserBookmarksAdapter.java
index 6efb554..a5d51dd 100644
--- a/src/com/android/browser/BrowserBookmarksAdapter.java
+++ b/src/com/android/browser/BrowserBookmarksAdapter.java
@@ -41,17 +41,21 @@ class BrowserBookmarksAdapter extends ResourceCursorAdapter {
TextView tv = (TextView) view.findViewById(R.id.label);
tv.setText(cursor.getString(BookmarksLoader.COLUMN_INDEX_TITLE));
-
Bitmap thumbnail = null;
- byte[] data = cursor.getBlob(BookmarksLoader.COLUMN_INDEX_THUMBNAIL);
- if (data != null) {
- thumbnail = BitmapFactory.decodeByteArray(data, 0, data.length);
- }
-
- if (thumbnail == null) {
- thumb.setImageResource(R.drawable.browser_thumbnail);
+ if (cursor.getInt(BookmarksLoader.COLUMN_INDEX_IS_FOLDER) != 0) {
+ // folder
+ thumb.setImageResource(R.drawable.ic_folder);
} else {
- thumb.setImageBitmap(thumbnail);
+ byte[] data = cursor.getBlob(BookmarksLoader.COLUMN_INDEX_THUMBNAIL);
+ if (data != null) {
+ thumbnail = BitmapFactory.decodeByteArray(data, 0, data.length);
+ }
+
+ if (thumbnail == null) {
+ thumb.setImageResource(R.drawable.browser_thumbnail);
+ } else {
+ thumb.setImageBitmap(thumbnail);
+ }
}
}
}