VelocityTracker.ComputeCurrentVelocity 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| ComputeCurrentVelocity(Int32) |
相當於 |
| ComputeCurrentVelocity(Int32, Single) |
根據收集到的點計算出電流速度。 |
ComputeCurrentVelocity(Int32)
相當於 #computeCurrentVelocity(int, float) 以最大浮點速度召喚。
[Android.Runtime.Register("computeCurrentVelocity", "(I)V", "")]
public void ComputeCurrentVelocity(int units);
[<Android.Runtime.Register("computeCurrentVelocity", "(I)V", "")>]
member this.ComputeCurrentVelocity : int -> unit
參數
- units
- Int32
用於單位的 System.Int32 值。
- 屬性
備註
等同於以最大速度為 Float.MAX_VALUE 的呼叫 #computeCurrentVelocity(int, float) 。
Java 文件 android.view.VelocityTracker.computeCurrentVelocity(int)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
另請參閱
- <xref:Android.Views.VelocityTracker.ComputeCurrentVelocity(System.Int32%2c+System.Single)>
適用於
ComputeCurrentVelocity(Int32, Single)
根據收集到的點計算出電流速度。
[Android.Runtime.Register("computeCurrentVelocity", "(IF)V", "")]
public void ComputeCurrentVelocity(int units, float maxVelocity);
[<Android.Runtime.Register("computeCurrentVelocity", "(IF)V", "")>]
member this.ComputeCurrentVelocity : int * single -> unit
參數
- units
- Int32
你想要的速度單位。 值為 1 則提供每毫秒的單位,1000 則提供每秒的單位,依此類推。請注意,這裡提到的單位就是用來報告運動的單位。 對於軸 X 和 Y,單位是像素。
- maxVelocity
- Single
此方法可計算的最大速度。 此值必須與單位參數相同的單位宣告。 此值必須是正數。
- 屬性
備註
根據收集到的點計算出電流速度。 只有當你真的想取得速度資訊時才會這麼做,因為這比較昂貴。 接著你可以用 #getXVelocity() 和 #getYVelocity()來取速度。
Java 文件 android.view.VelocityTracker.computeCurrentVelocity(int, float)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。