2011-06-10 125 views
3

如何阻止Android scrollview進行慣性滾動?默認使用是當我滾動得更快時,在將手指從設備上擡起後,它會繼續滾動。Android關閉滾動動畫

我想讓它停止滾動,當我放開。 XML中是否存在針對scrollview的標誌?

回答

2

setSmoothScrollbarEnabled() - 應該停用此行爲的方法。它也有一個名爲smoothScrollbar的XML屬性。

+0

嘿,那就是我現在試圖實施的。我想用XML的方式來做到這一點,因爲這只是XML文件中的一個簡單的'android:method'。 – CQM 2011-06-10 22:43:45

+2

你應該檢查Android文件有時:[鏈接](http://developer.android.com/reference/android/widget/AbsListView.html#attr_android:smoothScrollbar) – 2011-06-10 22:49:46

+0

謝謝,我只是用webview去這個實現 – CQM 2011-06-11 01:04:21