diff options
| author | Jeff Hamilton <jham@android.com> | 2010-08-19 00:12:27 -0500 |
|---|---|---|
| committer | Jeff Hamilton <jham@android.com> | 2010-09-02 13:33:19 -0500 |
| commit | f3026374dccf7b491152946c5d0e42daec08d899 (patch) | |
| tree | e3fbca3545f497490c5ecaf478b53c7da6bbd220 /src/com/android/browser/BrowserActivity.java | |
| parent | 46ea162d40380b643e5e04bf79d7107b72a39080 (diff) | |
| download | packages_apps_Browser-f3026374dccf7b491152946c5d0e42daec08d899.tar.gz packages_apps_Browser-f3026374dccf7b491152946c5d0e42daec08d899.tar.bz2 packages_apps_Browser-f3026374dccf7b491152946c5d0e42daec08d899.zip | |
Make the bookmark thumbnails larger.
Change-Id: I33e72e55e0cad9c73b3c50cb30277ed22eb511cb
Diffstat (limited to 'src/com/android/browser/BrowserActivity.java')
| -rw-r--r-- | src/com/android/browser/BrowserActivity.java | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java index 3535725ae..06e07105e 100644 --- a/src/com/android/browser/BrowserActivity.java +++ b/src/com/android/browser/BrowserActivity.java @@ -2480,38 +2480,23 @@ public class BrowserActivity extends Activity } /** - * Values for the size of the thumbnail created when taking a screenshot. - * Lazily initialized. Instead of using these directly, use - * getDesiredThumbnailWidth() or getDesiredThumbnailHeight(). - */ - private static int THUMBNAIL_WIDTH = 0; - private static int THUMBNAIL_HEIGHT = 0; - - /** * Return the desired width for thumbnail screenshots, which are stored in * the database, and used on the bookmarks screen. * @param context Context for finding out the density of the screen. - * @return int desired width for thumbnail screenshot. + * @return desired width for thumbnail screenshot. */ /* package */ static int getDesiredThumbnailWidth(Context context) { - if (THUMBNAIL_WIDTH == 0) { - float density = context.getResources().getDisplayMetrics().density; - THUMBNAIL_WIDTH = (int) (90 * density); - THUMBNAIL_HEIGHT = (int) (80 * density); - } - return THUMBNAIL_WIDTH; + return context.getResources().getDimensionPixelOffset(R.dimen.bookmarkThumbnailWidth); } /** * Return the desired height for thumbnail screenshots, which are stored in * the database, and used on the bookmarks screen. * @param context Context for finding out the density of the screen. - * @return int desired height for thumbnail screenshot. + * @return desired height for thumbnail screenshot. */ /* package */ static int getDesiredThumbnailHeight(Context context) { - // To ensure that they are both initialized. - getDesiredThumbnailWidth(context); - return THUMBNAIL_HEIGHT; + return context.getResources().getDimensionPixelOffset(R.dimen.bookmarkThumbnailHeight); } private Bitmap createScreenshot(WebView view, int width, int height) { |
