public class MultiSourceHelper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MultiSourceHelper.MultiSourceResult |
| Constructor and Description |
|---|
MultiSourceHelper() |
| Modifier and Type | Method and Description |
|---|---|
static MultiSourceHelper.MultiSourceResult |
getBestSourceForSize(int width,
int height,
java.util.List<ImageSource> sources) |
static MultiSourceHelper.MultiSourceResult |
getBestSourceForSize(int width,
int height,
java.util.List<ImageSource> sources,
double multiplier)
Chooses the image source with the size closest to the target image size.
|
public static MultiSourceHelper.MultiSourceResult getBestSourceForSize(int width, int height, java.util.List<ImageSource> sources)
public static MultiSourceHelper.MultiSourceResult getBestSourceForSize(int width, int height, java.util.List<ImageSource> sources, double multiplier)
width - the width of the view that will be used to display this imageheight - the height of the view that will be used to display this imagesources - the list of potential image sources to choose frommultiplier - the area of the view will be multiplied by this number before calculating the
best source; this is useful if the image will be displayed bigger than the view (e.g.
zoomed)