From: Soren Stoutner Date: Thu, 29 Oct 2015 16:00:22 +0000 (-0700) Subject: Scale favoriteIcon to 64 x 64 pixels. X-Git-Tag: v1.0~37 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=f5eaa704a5cc7e2240e10d40517980c7152af958;p=PrivacyBrowserAndroid.git Scale favoriteIcon to 64 x 64 pixels. --- diff --git a/app/src/main/java/com/stoutner/privacybrowser/Webview.java b/app/src/main/java/com/stoutner/privacybrowser/Webview.java index affbc10f..02613821 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/Webview.java +++ b/app/src/main/java/com/stoutner/privacybrowser/Webview.java @@ -3,8 +3,6 @@ package com.stoutner.privacybrowser; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; -import android.graphics.drawable.BitmapDrawable; -import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; @@ -17,7 +15,6 @@ import android.view.MenuItem; import android.view.View; import android.view.ViewTreeObserver; import android.view.inputmethod.InputMethodManager; -import android.webkit.ClientCertRequest; import android.webkit.WebChromeClient; import android.webkit.WebView; import android.webkit.WebViewClient; @@ -121,7 +118,7 @@ public class Webview extends AppCompatActivity { // Set the favorite icon when it changes. @Override public void onReceivedIcon(WebView view, Bitmap icon) { - favoriteIcon.setImageBitmap(icon); + favoriteIcon.setImageBitmap(Bitmap.createScaledBitmap(icon, 64, 64, true)); } });