View.PointerCaptureModeRelative 欄位
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
This constant will be removed in the future version. Use Android.Views.PointerCaptureMode enum directly instead of this field.
一種指標擷取模式,觸控板手勢會像滑鼠移動一樣被識別並回報。
[Android.Runtime.Register("POINTER_CAPTURE_MODE_RELATIVE", ApiSince=37)]
[System.Obsolete("This constant will be removed in the future version. Use Android.Views.PointerCaptureMode enum directly instead of this field.", true)]
public const Android.Views.PointerCaptureMode PointerCaptureModeRelative = 2;
[<Android.Runtime.Register("POINTER_CAPTURE_MODE_RELATIVE", ApiSince=37)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Views.PointerCaptureMode enum directly instead of this field.", true)>]
val mutable PointerCaptureModeRelative : Android.Views.PointerCaptureMode
欄位值
Value = 2- 屬性
備註
一種指標擷取模式,觸控板手勢會像滑鼠移動一樣被識別並回報。
在此擷取模式中,捕捉觸控板上所做的以下手勢會被辨識並回報:指標移動手勢(例如在觸控板上移動單指)會像滑鼠移動一樣被回報,MotionEvent.ACTION_MOVE動作及其相對位置變化可透過 MotionEvent.getX 和 MotionEvent.getY;捲動手勢(如雙指滑動)會像滑鼠滾輪一樣被回報,MotionEvent.ACTION_SCROLL動作和捲動量則透過MotionEvent.AXIS_VSCROLL和MotionEvent.AXIS_HSCROLL軸顯示。
動作值與手勢手指的物理動作成正比,物理移動(毫米)可依據 InputDevice.MotionRange.getResolution 報告的相關軸解析度來計算。
這些事件將與InputDevice.SOURCE_MOUSE_RELATIVE一同報導。
無論擷取模式如何,老鼠事件都會以相同方式回報。
Android 參考資料。android.view.View.POINTER_CAPTURE_MODE_RELATIVE
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。