SurfaceContainer


@CarProtocol
public final class SurfaceContainer


A container for the Surface created by the host and its associated properties.

Summary

Public constructors

SurfaceContainer(@Nullable Surface surface, int width, int height, int dpi)

Public methods

int

Returns the pixel density of the surface or 0 if the surface is not ready.

int

Returns the height of the surface or 0 if the surface is not ready.

@Nullable Surface

Returns the Surface held by the host or null if the surface is not ready.

int

Returns the width of the surface or 0 if the surface is not ready.

String

Public constructors

SurfaceContainer

Added in 1.0.0
public SurfaceContainer(@Nullable Surface surface, int width, int height, int dpi)

Public methods

getDpi

Added in 1.0.0
public int getDpi()

Returns the pixel density of the surface or 0 if the surface is not ready.

getHeight

Added in 1.0.0
public int getHeight()

Returns the height of the surface or 0 if the surface is not ready.

getSurface

Added in 1.0.0
public @Nullable Surface getSurface()

Returns the Surface held by the host or null if the surface is not ready.

getWidth

Added in 1.0.0
public int getWidth()

Returns the width of the surface or 0 if the surface is not ready.

toString

public String toString()