-
public class MultiSourceHelper
Helper class for dealing with multisource images.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
MultiSourceHelper.MultiSourceResult
-
Method Summary
Modifier and Type Method Description static MultiSourceHelper.MultiSourceResult
getBestSourceForSize(int width, int height, List<ImageSource> sources)
static MultiSourceHelper.MultiSourceResult
getBestSourceForSize(int width, int height, List<ImageSource> sources, double multiplier)
Chooses the image source with the size closest to the target image size. -
-
Method Detail
-
getBestSourceForSize
static MultiSourceHelper.MultiSourceResult getBestSourceForSize(int width, int height, List<ImageSource> sources)
-
getBestSourceForSize
static MultiSourceHelper.MultiSourceResult getBestSourceForSize(int width, int height, List<ImageSource> sources, double multiplier)
Chooses the image source with the size closest to the target image size.
- Parameters:
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 thebest source; this is useful if the image will be displayed bigger than the view (e.g.
-
-
-
-