InputDevice.ViewBehavior.ShouldSmoothScroll(Int32, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳視圖在捲動時是否應該因輸入裝置產生的平 MotionEvent 滑捲動而平滑。
[Android.Runtime.Register("shouldSmoothScroll", "(II)Z", "", ApiSince=35)]
public bool ShouldSmoothScroll(int axis, int source);
[<Android.Runtime.Register("shouldSmoothScroll", "(II)Z", "", ApiSince=35)>]
member this.ShouldSmoothScroll : int * int -> bool
參數
- axis
- Int32
用 MotionEvent 來取得滾動範圍的軸。
- source
- Int32
InputDevice觸發卷軸的來源MotionEvent。
傳回
true 是否應該使用平滑捲動來進行滾動,或 false 是否不需要平滑捲動,或輸入裝置無法使用提供的軸與來源組合。
- 屬性
備註
回傳視圖在捲動時是否應該因輸入裝置產生的平 MotionEvent 滑捲動而平滑。
此處的平滑滾動指的是用來動畫化捲軸起始與結束位置之間的轉換。 當此方法返回 true時,視圖應嘗試在指定軸向及來源下,為裝置生成的捲動動畫,以產生良好的捲動使用者體驗。 如果此方法返回 false,則不需要動畫捲軸。
若輸入裝置沒有與所提供軸與來源的 a MotionRange ,則此方法回傳 false。
Java 文件 android.view.InputDevice.ViewBehavior.shouldSmoothScroll(int, int)。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。