语言

PrintDocumentAdapter.OnLayout 方法

定义

当打印属性(页面大小、密度等)发生更改时调用,使你有机会布局内容,使其与新约束匹配。

[Android.Runtime.Register("onLayout", "(Landroid/print/PrintAttributes;Landroid/print/PrintAttributes;Landroid/os/CancellationSignal;Landroid/print/PrintDocumentAdapter$LayoutResultCallback;Landroid/os/Bundle;)V", "GetOnLayout_Landroid_print_PrintAttributes_Landroid_print_PrintAttributes_Landroid_os_CancellationSignal_Landroid_print_PrintDocumentAdapter_LayoutResultCallback_Landroid_os_Bundle_Handler")]
public abstract void OnLayout(Android.Print.PrintAttributes? oldAttributes, Android.Print.PrintAttributes? newAttributes, Android.OS.CancellationSignal? cancellationSignal, Android.Print.PrintDocumentAdapter.LayoutResultCallback? callback, Android.OS.Bundle? extras);
[<Android.Runtime.Register("onLayout", "(Landroid/print/PrintAttributes;Landroid/print/PrintAttributes;Landroid/os/CancellationSignal;Landroid/print/PrintDocumentAdapter$LayoutResultCallback;Landroid/os/Bundle;)V", "GetOnLayout_Landroid_print_PrintAttributes_Landroid_print_PrintAttributes_Landroid_os_CancellationSignal_Landroid_print_PrintDocumentAdapter_LayoutResultCallback_Landroid_os_Bundle_Handler")>]
abstract member OnLayout : Android.Print.PrintAttributes * Android.Print.PrintAttributes * Android.OS.CancellationSignal * Android.Print.PrintDocumentAdapter.LayoutResultCallback * Android.OS.Bundle -> unit

参数

oldAttributes
PrintAttributes

旧的打印属性。

newAttributes
PrintAttributes

新的打印属性。

cancellationSignal
CancellationSignal

用于观察取消布局请求的信号。

callback
PrintDocumentAdapter.LayoutResultCallback

用于通知系统布局结果的回调。

extras
Bundle

有关如何布局内容的其他信息。

特性

注解

Java文档android.print.PrintDocumentAdapter.onLayout(android.print.PrintAttributes, android.print.PrintAttributes, android.os.CancellationSignal, android.print.LayoutResultCallback, android.os.Bundle)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

另请参阅