Most visited

Recently visited

Added in API level 19

PrintDocumentInfo.Builder

public static final class PrintDocumentInfo.Builder
extends Object

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


用于创建 PrintDocumentInfo生成器。

Summary

Public constructors

PrintDocumentInfo.Builder(String name)

构造函数。

Public methods

PrintDocumentInfo build()

创建一个新的 PrintDocumentInfo实例。

PrintDocumentInfo.Builder setContentType(int type)

设置内容类型。

PrintDocumentInfo.Builder setPageCount(int pageCount)

设置总页数。

Inherited methods

From class java.lang.Object

Public constructors

PrintDocumentInfo.Builder

Added in API level 19
PrintDocumentInfo.Builder (String name)

构造函数。

相关属性的值使用默认值进行初始化。 有关默认值的信息,请参阅各个setter的文档。

Parameters
name String: The document name which may be shown to the user and is the file name if the content it describes is saved as a PDF. Cannot be empty.

Public methods

build

Added in API level 19
PrintDocumentInfo build ()

创建一个新的 PrintDocumentInfo实例。

Returns
PrintDocumentInfo The new instance.

setContentType

Added in API level 19
PrintDocumentInfo.Builder setContentType (int type)

设置内容类型。

默认: CONTENT_TYPE_UNKNOWN

Parameters
type int: The content type.
Returns
PrintDocumentInfo.Builder This builder.

也可以看看:

setPageCount

Added in API level 19
PrintDocumentInfo.Builder setPageCount (int pageCount)

设置总页数。

默认: PAGE_COUNT_UNKNOWN

Parameters
pageCount int: The number of pages. Must be greater than or equal to zero or PAGE_COUNT_UNKNOWN.
Returns
PrintDocumentInfo.Builder This builder.

Hooray!