FetchPhotoRequest.Builder

public abstract class FetchPhotoRequest.Builder


Builder for FetchPhotoRequest.

Summary

Public constructors

Public methods

FetchPhotoRequest

Build the FetchPhotoRequest.

abstract @Nullable CancellationToken

Gets the CancellationToken used by PlacesClient to cancel any queued requests.

abstract @Nullable Integer

Gets the maximum desired height in pixels, of the image returned by the Place Photos service.

abstract @Nullable Integer

Gets the maximum desired width in pixels of the image returned by the Place Photos service.

abstract FetchPhotoRequest.Builder

Sets the CancellationToken used by PlacesClient to cancel any queued requests.

abstract FetchPhotoRequest.Builder
setMaxHeight(@Nullable @IntRange(from = 1, to = 1600) Integer maxHeight)

Sets the maximum desired height in pixels, of the image returned by the Place Photos service.

abstract FetchPhotoRequest.Builder
setMaxWidth(@Nullable @IntRange(from = 1, to = 1600) Integer maxWidth)

Sets the maximum desired width in pixels of the image returned by the Place Photos service.

Public constructors

Builder

public Builder()

Public methods

build

public FetchPhotoRequest build()

Build the FetchPhotoRequest.

getCancellationToken

public abstract @Nullable CancellationToken getCancellationToken()

Gets the CancellationToken used by PlacesClient to cancel any queued requests.

getMaxHeight

public abstract @Nullable Integer getMaxHeight()

Gets the maximum desired height in pixels, of the image returned by the Place Photos service.

If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both setMaxHeight and setMaxWidth properties should be set to an integer between 1 and 1600.

getMaxWidth

public abstract @Nullable Integer getMaxWidth()

Gets the maximum desired width in pixels of the image returned by the Place Photos service.

If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both setMaxHeight and setMaxWidth properties should be set to an integer between 1 and 1600.

setCancellationToken

public abstract FetchPhotoRequest.Builder setCancellationToken(@Nullable CancellationToken cancellationToken)

Sets the CancellationToken used by PlacesClient to cancel any queued requests.

setMaxHeight

public abstract FetchPhotoRequest.Builder setMaxHeight(@Nullable @IntRange(from = 1, to = 1600) Integer maxHeight)

Sets the maximum desired height in pixels, of the image returned by the Place Photos service.

If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both setMaxHeight and setMaxWidth properties should be set to an integer between 1 and 1600.

setMaxWidth

public abstract FetchPhotoRequest.Builder setMaxWidth(@Nullable @IntRange(from = 1, to = 1600) Integer maxWidth)

Sets the maximum desired width in pixels of the image returned by the Place Photos service.

If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both setMaxHeight and setMaxWidth properties should be set to an integer between 1 and 1600.