Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

close

- - Get Started
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
    - Get the SDK
  - Google Services
- - Google Play
  - Publishing
  - Promoting
  - App Quality
  - Spotlight
  - Open Distribution

## Results

Loading...
Summary: Inherited Constants | Fields | Ctors | Methods | Inherited Methods | [Expand All]
public final class

# WebImage

extends Object
implements Parcelable

java.lang.Object
↳ | com.google.android.gms.common.images.WebImage

## Class Overview

A class that represents an image that is located on a web server.

## Summary

[Expand] Inherited Constants

From interface android.os.Parcelable

int | CONTENTS_FILE_DESCRIPTOR |
int | PARCELABLE_WRITE_RETURN_VALUE |

Fields
public static final Creator<WebImage> | CREATOR |

Public Constructors
| WebImage(Uri url, int width, int height) Constructs a new `WebImage` with the given URL and dimensions.
| WebImage(Uri url) Constructs a new `WebImage` with the given URL.

Public Methods
int | describeContents()
boolean | equals(Object other)
int | getHeight() 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)

[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()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

From interface android.os.Parcelable

abstract int | describeContents()
abstract void | writeToParcel(Parcel arg0, int arg1)

## Fields

#### public static final Creator<WebImage> CREATOR

## Public Constructors

#### public WebImage (Uri url, int width, int height)

Constructs a new `WebImage` with the given URL and dimensions.

##### Parameters

url | The URL of the image.
width | The width of the image, in pixels.
height | The height of the image, in pixels.

##### Throws

IllegalArgumentException | If the URL is null or empty, or the dimensions are invalid.

#### public WebImage (Uri url)

Constructs a new `WebImage` with the given URL.

##### Parameters

url | The URL of the image.

##### Throws

IllegalArgumentException | If the URL is null or empty.

## Public Methods

#### public int describeContents ()

#### public boolean equals (Object other)

#### public int getHeight ()

Gets the image height, in pixels.

#### public Uri getUrl ()

Gets the image URL.

#### public int getWidth ()

Gets the image width, in pixels.

#### public int hashCode ()

#### public String toString ()

Returns a string representation of this object.

#### public void writeToParcel (Parcel out, int flags)