public class VKApiPhotoSize extends VKApiModel implements java.lang.Comparable<VKApiPhotoSize>, android.os.Parcelable, Identifiable
sizes: [{
src: http://cs323930.vk.me/v323930021/53f7/OwV0l2YFJ7s.jpg
width: 75,
height: 50,
type: 's'
}, {
src: http://cs323930.vk.me/v323930021/53f8/qX8MRNyUPqg.jpg,
width: 130,
height: 87,
type: 'm'
}, {
src: http://cs323930.vk.me/v323930021/53f9/7fBJyr9OHMA.jpg,
width: 604,
height: 404,
type: 'x'
}, {
src: http://cs323930.vk.me/v323930021/53fa/bskHpsuH6sM.jpg,
width: 807,
height: 540,
type: 'y'
}, {
src: http://cs323930.vk.me/v323930021/53fb/1VrEC2eSkZQ.jpg,
width: 1280,
height: 856,
type: 'z'
}, {
src: http://cs323930.vk.me/v323930021/53fc/iAl-TIHfRDY.jpg,
width: 130,
height: 87,
type: 'o'
}, {
src: http://cs323930.vk.me/v323930021/53fd/qjD0fbHkgmI.jpg,
width: 200,
height: 134,
type: 'p'
}, {
src: http://cs323930.vk.me/v323930021/53fe/3d2nCvvKQfw.jpg,
width: 320,
height: 214,
type: 'q'
}, {
src: http://cs323930.vk.me/v323930021/53ff/uK_Nj34SIY8.jpg,
width: 510,
height: 341,
type: 'r'
}]
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<VKApiPhotoSize> |
CREATOR |
int |
height
Height of image in pixels
|
static char |
M
Proportional copy with 130px max width
|
static char |
O
If original image's "width/height" ratio is less or equal to 3:2, then proportional
copy with 130px max width.
|
static char |
P
If original image's "width/height" ratio is less or equal to 3:2, then proportional
copy with 200px max width.
|
static char |
Q
If original image's "width/height" ratio is less or equal to 3:2, then proportional
copy with 320px max width.
|
static char |
S
Proportional copy with 75px max width
|
java.lang.String |
src
Url of image
|
char |
type
|
static char |
W
Proportional copy with 2560x2048px max size
|
int |
width
Width of image in pixels
|
static char |
X
Proportional copy with 604px max width
|
static char |
Y
Proportional copy with 807px max width
|
static char |
Z
Proportional copy with 1280x1024px max size
|
fields| Constructor and Description |
|---|
VKApiPhotoSize(org.json.JSONObject from) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(VKApiPhotoSize another) |
static VKApiPhotoSize |
create(java.lang.String url,
char type,
int originalWidth,
int originalHeight)
Creates a dimension type and size of the original.
|
static VKApiPhotoSize |
create(java.lang.String url,
int dimension)
Creates a square dimension type and size of the original.
|
static VKApiPhotoSize |
create(java.lang.String url,
int width,
int height)
Creates a dimension with explicit dimensions.
|
int |
describeContents() |
int |
getId()
Returns unique identifier of this object(usually it's value of JSON field "id").
|
static VKApiPhotoSize |
parse(org.json.JSONObject source,
int originalWidth,
int originalHeight)
Creates dimension from
source. |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final char S
public static final char M
public static final char X
public static final char Y
public static final char O
public static final char P
public static final char Q
public static final char Z
public static final char W
public java.lang.String src
public int width
public int height
public char type
public static android.os.Parcelable.Creator<VKApiPhotoSize> CREATOR
public VKApiPhotoSize(org.json.JSONObject from)
throws org.json.JSONException
org.json.JSONExceptionpublic int compareTo(VKApiPhotoSize another)
compareTo in interface java.lang.Comparable<VKApiPhotoSize>public int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelablepublic int getId()
IdentifiablegetId in interface Identifiablepublic static VKApiPhotoSize parse(org.json.JSONObject source, int originalWidth, int originalHeight)
source. Used in parsing.
If size is not specified copies calculates them based on internal algorithms.source - object in format, returned VK API, which is generated from the dimensionoriginalWidth - original image width in pixelsoriginalHeight - original image height in pixelspublic static VKApiPhotoSize create(java.lang.String url, int width, int height)
public static VKApiPhotoSize create(java.lang.String url, char type, int originalWidth, int originalHeight)
public static VKApiPhotoSize create(java.lang.String url, int dimension)