Bug 1301718: FaviconView extends AppCompatImageView. r=liuche
This change is unrelated to this bug.
According to my IDE warning:
```
This custom view should extend android.support.v7.widget.AppCompatImageView
instead.
In order to support features such as tinting, the appcompat library will
automatically load special appcompat replacements for the builtin widgets.
However, this does not work for your custom views.
Instead of extending the android.widget classes directly, you should instead
extend one of the delegate classes in android.support.v7.widget.AppCompat.
```
Seems reasonable and I don't see any documentation telling me not to. :)
MozReview-Commit-ID: H60bYGVgTIT
--- a/mobile/android/base/java/org/mozilla/gecko/widget/FaviconView.java
+++ b/mobile/android/base/java/org/mozilla/gecko/widget/FaviconView.java
@@ -1,16 +1,17 @@
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.widget;
import android.graphics.Color;
+import android.support.v7.widget.AppCompatImageView;
import org.mozilla.gecko.R;
import org.mozilla.gecko.icons.IconCallback;
import org.mozilla.gecko.icons.IconResponse;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
@@ -26,17 +27,17 @@ import android.widget.ImageView;
import java.lang.ref.WeakReference;
/**
* Special version of ImageView for favicons.
* Displays solid colour background around Favicon to fill space not occupied by the icon. Colour
* selected is the dominant colour of the provided Favicon.
*/
-public class FaviconView extends ImageView {
+public class FaviconView extends AppCompatImageView {
// Default x/y-radius of the oval used to round the corners of the background (dp)
private static final int DEFAULT_CORNER_RADIUS_DP = 2;
/**
* True if we're capable of, and want to, display an image, false otherwise. This acts as a switch: if we
* don't want to show an image, most other state will be ignored because we don't need it to draw.
*