Most visited

Recently visited

Added in API level 19

PrintAttributes.Builder

public static final class PrintAttributes.Builder
extends Object

java.lang.Object
   ↳ android.print.PrintAttributes.Builder


Builder for creating PrintAttributes.

Summary

Public constructors

PrintAttributes.Builder()

Public methods

PrintAttributes build()

Creates a new PrintAttributes instance.

PrintAttributes.Builder setColorMode(int colorMode)

Sets the color mode.

PrintAttributes.Builder setDuplexMode(int duplexMode)

Sets the duplex mode.

PrintAttributes.Builder setMediaSize(PrintAttributes.MediaSize mediaSize)

Sets the media size.

PrintAttributes.Builder setMinMargins(PrintAttributes.Margins margins)

Sets the minimal margins.

PrintAttributes.Builder setResolution(PrintAttributes.Resolution resolution)

Sets the resolution.

Inherited methods

From class java.lang.Object

Public constructors

PrintAttributes.Builder

Added in API level 19
PrintAttributes.Builder ()

Public methods

build

Added in API level 19
PrintAttributes build ()

Creates a new PrintAttributes instance.

Returns
PrintAttributes The new instance.

setColorMode

Added in API level 19
PrintAttributes.Builder setColorMode (int colorMode)

Sets the color mode.

Parameters
colorMode int: A valid color mode or zero.
Returns
PrintAttributes.Builder This builder.

See also:

setDuplexMode

Added in API level 23
PrintAttributes.Builder setDuplexMode (int duplexMode)

Sets the duplex mode.

Parameters
duplexMode int: A valid duplex mode or zero.
Returns
PrintAttributes.Builder This builder.

See also:

setMediaSize

Added in API level 19
PrintAttributes.Builder setMediaSize (PrintAttributes.MediaSize mediaSize)

Sets the media size.

Parameters
mediaSize PrintAttributes.MediaSize: The media size.
Returns
PrintAttributes.Builder This builder.

setMinMargins

Added in API level 19
PrintAttributes.Builder setMinMargins (PrintAttributes.Margins margins)

Sets the minimal margins. If the content does not fit these margins it will be clipped.

Parameters
margins PrintAttributes.Margins: The margins.
Returns
PrintAttributes.Builder This builder.

setResolution

Added in API level 19
PrintAttributes.Builder setResolution (PrintAttributes.Resolution resolution)

Sets the resolution.

Parameters
resolution PrintAttributes.Resolution: The resolution.
Returns
PrintAttributes.Builder This builder.

Hooray!