WebImage
public final class WebImage implements Parcelable
A class that represents an image that is located on a web server.
Summary
Constants |
|
|---|---|
static final Parcelable.Creator<WebImage> |
Public constructors |
|---|
|
Constructs a new |
|
Constructs a new |
Public methods |
|
|---|---|
boolean |
|
int |
Gets the image height, in pixels. |
Uri |
getUrl()Gets the image URL. |
int |
getWidth()Gets the image width, in pixels. |
int |
hashCode() |
String |
toString()Returns a string representation of this object. |
void |
writeToParcel(Parcel out, int flags) |
Inherited Constants |
||||
|---|---|---|---|---|
|
Inherited methods |
||
|---|---|---|
|
Constants
Public constructors
WebImage
public WebImage(Uri url)
Constructs a new WebImage with the given URL.
| Parameters | |
|---|---|
Uri url |
The URL of the image. |
| Throws | |
|---|---|
java.lang.IllegalArgumentException |
If the URL is null or empty. |
WebImage
public WebImage(Uri url, int width, int height)
Constructs a new WebImage with the given URL and dimensions.
| Parameters | |
|---|---|
Uri url |
The URL of the image. |
int width |
The width of the image, in pixels. |
int height |
The height of the image, in pixels. |
| Throws | |
|---|---|
java.lang.IllegalArgumentException |
If the URL is null or empty, or the dimensions are invalid. |