語言

AccessibilityService.MagnificationController.SetCenter 方法

定義

設定放大視窗的中心位置。

[Android.Runtime.Register("setCenter", "(FFZ)Z", "", ApiSince=24)]
public bool SetCenter(float centerX, float centerY, bool animate);
[<Android.Runtime.Register("setCenter", "(FFZ)Z", "", ApiSince=24)>]
member this.SetCenter : single * single * bool -> bool

參數

centerX
Single

未縮放的螢幕相對 X 座標,作為視窗居中

centerY
Single

未縮放的螢幕相對 Y 座標,用以置中視窗

animate
Boolean

true 從目前的視窗中心進行動畫,或 false 立即設定中心

傳回

true 關於成功,對 false 失敗

屬性

備註

設定放大視窗的中心位置。

<強>注意:</strong> 如果服務尚未連接(例如 AccessibilityService#onServiceConnected() 尚未被呼叫)或服務已斷線,此方法將無效並回傳 false。

<strong>Note:</strong> 這個舊有 API 將全螢幕放大率設為中心。 要設定指定放大鏡的中心,請用 #setMagnificationConfig 代替。

此會員已被棄用。 請改用 #setMagnificationConfig(MagnificationConfig, boolean)

Java 文件 android.accessibilityservice.AccessibilityService.MagnificationController.setCenter(float, float, boolean)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於