summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/BrowserBookmarksAdapter.java
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2009-09-21 14:29:20 +0100
committerBen Murdoch <benm@google.com>2009-09-21 14:29:20 +0100
commitdcc2b6f08dd5677bc6ba761a9ba6f1c655113051 (patch)
treefdb8ca6bbe1833fad6e39c489a8fa14253e11bb5 /src/com/android/browser/BrowserBookmarksAdapter.java
parent5942df0c38dff7e4335e352e2d03f100b07b8907 (diff)
downloadpackages_apps_browser-dcc2b6f08dd5677bc6ba761a9ba6f1c655113051.zip
packages_apps_browser-dcc2b6f08dd5677bc6ba761a9ba6f1c655113051.tar.gz
packages_apps_browser-dcc2b6f08dd5677bc6ba761a9ba6f1c655113051.tar.bz2
Put current screenshot under "Add" on bookmark thumbnail page.
Change-Id: Iaf52037f755fea343ef68a23d3740f0f5cdcecb7
Diffstat (limited to 'src/com/android/browser/BrowserBookmarksAdapter.java')
-rw-r--r--src/com/android/browser/BrowserBookmarksAdapter.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/com/android/browser/BrowserBookmarksAdapter.java b/src/com/android/browser/BrowserBookmarksAdapter.java
index e2c09cf..bd29166 100644
--- a/src/com/android/browser/BrowserBookmarksAdapter.java
+++ b/src/com/android/browser/BrowserBookmarksAdapter.java
@@ -46,6 +46,7 @@ class BrowserBookmarksAdapter extends BaseAdapter {
private String mCurrentPage;
private String mCurrentTitle;
+ private Bitmap mCurrentThumbnail;
private Cursor mCursor;
private int mCount;
private BrowserBookmarksPage mBookmarksPage;
@@ -73,7 +74,8 @@ class BrowserBookmarksAdapter extends BaseAdapter {
* appropriately after a search.
*/
public BrowserBookmarksAdapter(BrowserBookmarksPage b, String curPage,
- String curTitle, boolean createShortcut, boolean mostVisited) {
+ String curTitle, Bitmap curThumbnail, boolean createShortcut,
+ boolean mostVisited) {
mNeedsOffset = !(createShortcut || mostVisited);
mMostVisited = mostVisited;
mExtraOffset = mNeedsOffset ? 1 : 0;
@@ -81,6 +83,7 @@ class BrowserBookmarksAdapter extends BaseAdapter {
mCurrentPage = b.getResources().getString(R.string.current_page)
+ curPage;
mCurrentTitle = curTitle;
+ mCurrentThumbnail = curThumbnail;
mContentResolver = b.getContentResolver();
mViewMode = BookmarkViewMode.LIST;
@@ -427,8 +430,13 @@ class BrowserBookmarksAdapter extends BaseAdapter {
// This is to create a bookmark for the current page.
holder.setVisibility(View.VISIBLE);
tv.setText(mCurrentTitle);
- // FIXME: Want to show the screenshot of the current page
- thumb.setImageResource(R.drawable.blank);
+
+ if (mCurrentThumbnail != null) {
+ thumb.setImageBitmap(mCurrentThumbnail);
+ } else {
+ thumb.setImageResource(
+ R.drawable.ic_launcher_shortcut_browser_bookmark);
+ }
return convertView;
}
holder.setVisibility(View.GONE);