mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 905685 - Clear favicon until the new image finishes loading in TwoLinePageRow (r=sriram)
This commit is contained in:
parent
63ca8c5534
commit
59c9b9f42e
@ -197,6 +197,9 @@ public class TwoLinePageRow extends LinearLayout
|
||||
if (favicon != null) {
|
||||
setFaviconWithUrl(favicon, url);
|
||||
} else {
|
||||
// Show blank image until the new favicon finishes loading
|
||||
mFavicon.clearImage();
|
||||
|
||||
mLoadFaviconTask = new LoadFaviconTask(url);
|
||||
|
||||
// Try to use a thread pool instead of serial execution of tasks
|
||||
|
@ -154,6 +154,14 @@ public class FaviconView extends ImageView {
|
||||
formatImage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear image and background shown by this view.
|
||||
*/
|
||||
public void clearImage() {
|
||||
setImageResource(0);
|
||||
hideBackground();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the displayed image and apply the scaling logic.
|
||||
* The scaling logic will attempt to resize the image to fit correctly inside the view in a way
|
||||
|
Loading…
Reference in New Issue
Block a user