XML Layout
1android:scrollbars="none"android:scrollbarswill define which scrollbars to display or show any at all. This won’t disable scrolling as such (you’ll be able to scroll in the appropriate direction) but just hide the scrollbars from the user interface. More of a UI switch.Programatically, you can callView.setVerticalScrollBarEnabled(boolean)andView.setHorizontalScrollBarEnabled(boolean)for similar effect.Return true from ListView onTouch event
123456listView.setOnTouchListener(newView.OnTouchListener() {publicbooleanonTouch(View v, MotionEvent event) {return(event.getAction() == MotionEvent.ACTION_MOVE);}});
2015年9月2日 星期三
[Android] disable scrolling motion in the listview
reference: http://codetheory.in/android-listview-scrolling-viewgroup-hide-disable-scrollbars/
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言