On my Samsung Galaxy S, the ListView
gets an elastic effect if over-scr开发者_高级运维olled. But I don't want this in my application. Can I disable this elastic scrolling?
If by Elastic you mean the way the listview handles overscrolling by doing it similar to the Sense UI or the iPhone, then you may be interested in setOverscrollMode, setOverscrollHeader, setOverscrollFooter, and onOverscroll. Good luck getting it resolved!
You can disable elastic effect if Samsung has exposed a disable
API for it, or you can override the methods specified in Ty.S's answer if the Android version is 2.3 or later (API level 9 and above). Otherwise there is no way you can fiddle with Samsung Galaxy's ListView.
With theme you can override backgrounds but not disable scroll effect:
<application android:icon="@drawable/icon" android:label="@string/app_name"
android:debuggable="true" android:theme="@android:style/Theme.Light">
精彩评论