在我的应用程序的每个 Activity 中,用户都可以同时按下两个按钮。 我怎样才能阻止他们这样做?
最佳答案
you can disable the multi touch in the screen...which can allow only single touch by
place this line button viewGroup layout
android:splitMotionEvents="false"
<LinearLayout
android:id="@+id/list_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:splitMotionEvents="false" >
<Button
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:scrollbars="none" >
</Button>
<Button
android:id="@+id/listView2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:scrollbars="none" >
</Button>
</LinearLayout>
关于android - 如何防止用户同时按下两个按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22198843/