让触摸屏不好用
重写一个listView 然后在里面改一下触摸屏事件
public class CustomListView extends ListView { Context mContext; public CustomListView (Context context, AttributeSet attrs){ super(context, attrs); mContext = context; } public boolean onTouchEvent(MotionEvent event){ if (event.getRawY() < 100){ Log.d("Your tag", "Allowing the touch to go to the list."); super.onTouchEvent(event); return true; } else { Log.d("Your tag", "Not allowing the touch to go to the list."); return true; } } }
<com.CustomListView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/start_menu_background" android:cacheColorHint="#00000000" android:id="@android:id/list"> </com.CustomListView>
相关推荐
89236831 2019-12-21
xiaobing00 2011-06-10
hcr 2011-06-05
Sabrina 2012-02-09
Horse00 2015-06-28
badun 2014-10-07
81274551 2014-07-16
qtlearn 2013-06-20
Poem 2012-02-09
zlsh00 2011-12-26
kanpiaoxue 2016-10-27
jackadmi 2014-10-13
Herorong 2013-05-21
linuxjourney 2012-12-17
linkelinux 2007-07-17
特种兵PPT工作室 2013-07-09
深圳湾 2018-03-20