mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1012462 - Part 10: Ensure URL images always fit within the view bounds (r=rnewman)
This commit is contained in:
parent
acd8b16b2a
commit
fbfafab1f4
@ -45,6 +45,7 @@ public class TopSitesGridItemView extends RelativeLayout {
|
||||
private static final ScaleType SCALE_TYPE_FAVICON = ScaleType.CENTER;
|
||||
private static final ScaleType SCALE_TYPE_RESOURCE = ScaleType.CENTER;
|
||||
private static final ScaleType SCALE_TYPE_THUMBNAIL = ScaleType.CENTER_CROP;
|
||||
private static final ScaleType SCALE_TYPE_URL = ScaleType.CENTER_INSIDE;
|
||||
|
||||
// Child views.
|
||||
private final TextView mTitleView;
|
||||
@ -246,7 +247,7 @@ public class TopSitesGridItemView extends RelativeLayout {
|
||||
* @param bgColor background color to use in the view.
|
||||
*/
|
||||
public void displayThumbnail(final String imageUrl, final int bgColor) {
|
||||
mThumbnailView.setScaleType(SCALE_TYPE_RESOURCE);
|
||||
mThumbnailView.setScaleType(SCALE_TYPE_URL);
|
||||
mThumbnailView.setBackgroundColor(bgColor);
|
||||
mThumbnailSet = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user