java.lang.Object |
↳ |
com.facebook.imagepipeline.producers.ThumbnailSizeChecker |
Class Overview
Utility class to consistently check whether a given thumbnail size will be sufficient for a given
request with ResizeOptions
.
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Constants
public
static
final
float
ACCEPTABLE_REQUESTED_TO_ACTUAL_SIZE_RATIO
The ratio between the requested size and the minimum thumbnail size which will be considered
big enough. This will allow a thumbnail which is actually 75% of the requested size to be used
and scaled up.
Constant Value:
1.3333334
Public Constructors
public
ThumbnailSizeChecker
()
Public Methods
public
static
int
getAcceptableSize
(int size)
public
static
boolean
isImageBigEnough
(int width, int height, ResizeOptions resizeOptions)
Checks whether the producer may be able to produce images of the specified size. This makes no
promise about being able to produce images for a particular source, only generally being able
to produce output of the desired resolution.
Parameters
width |
the desired width |
height |
the desired height |
Returns
- true if the producer can meet these needs