Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public static final class

PrintAttributes.Builder

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

Class Overview

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 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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public PrintAttributes.Builder ()

Public Methods

public PrintAttributes build ()

Creates a new PrintAttributes instance.

Returns
  • The new instance.

public PrintAttributes.Builder setColorMode (int colorMode)

Sets the color mode.

Parameters
colorMode A valid color mode or zero.
Returns
  • This builder.

public PrintAttributes.Builder setMediaSize ( PrintAttributes.MediaSize mediaSize)

Sets the media size.

Parameters
mediaSize The media size.
Returns
  • This builder.

public PrintAttributes.Builder setMinMargins ( PrintAttributes.Margins margins)

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

Parameters
margins The margins.
Returns
  • This builder.

public PrintAttributes.Builder setResolution ( PrintAttributes.Resolution resolution)

Sets the resolution.

Parameters
resolution The resolution.
Returns
  • This builder.