語言

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

關於如何排版內容的額外資訊。

屬性

備註

的 android.print.PrintDocumentAdapter.onLayout(android.print.PrintAttributes, android.print.PrintAttributes, android.os.CancellationSignal, android.print.LayoutResultCallback, android.os.Bundle)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於

另請參閱