Android 同时触摸两个不同的按钮会触发另一个按钮(中间一个)
我在线性布局中有5个按钮 我的问题是,同时触摸最左侧和最右侧按钮会触发中间按钮 我试过了Android 同时触摸两个不同的按钮会触发另一个按钮(中间一个),android,android-linearlayout,multi-touch,Android,Android Linearlayout,Multi Touch,我在线性布局中有5个按钮 我的问题是,同时触摸最左侧和最右侧按钮会触发中间按钮 我试过了 android:splitMotionEvents="false" android:windowEnableSplitTouch="false" 不幸的是,一切都不起作用。我该怎么办 我的XML片段是 <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_pa
android:splitMotionEvents="false"
android:windowEnableSplitTouch="false"
不幸的是,一切都不起作用。我该怎么办
我的XML片段是
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:splitMotionEvents="false"
android:windowEnableSplitTouch="false" >
<Button
android:id="@+id/someText1"
style="@style/ButtonStyle"
android:layout_marginRight="10dp"
android:onClick="someText1"
android:text="someText1" />
<Button
android:id="@+id/someText2"
style="@style/ButtonStyle"
android:layout_marginRight="10dp"
android:enabled="false"
android:onClick="someText2"
android:text="someText2" />
<Button
android:id="@+id/someText3"
style="@style/ButtonStyle"
android:layout_marginRight="10dp"
android:onClick="someText3"
android:text="someText3" />
<Button
android:id="@+id/someText4"
style="@style/ButtonStyle"
android:layout_marginRight="10dp"
android:onClick="someText4"
android:text="someText4" />
<Button
android:id="@+id/someText5"
style="@style/ButtonStyle"
android:layout_marginRight="10dp"
android:onClick="someText5"
android:text="someText5" />
<Button
android:id="@+id/someText6"
style="@style/ButtonStyle"
android:onClick="someText6"
android:text="someText6" />
</LinearLayout>
如果没有直接的解决方案,是否有解决办法
注意:我正在使用AndroidJellyBean4.1.2
事先非常感谢。我不知道它是否有效 只需尝试在java代码中动态设置OnClick侦听器 像
我假设一次按下几个股票按钮(android.widget.button)是不可能的
您可以实现自己的按钮,也可以在父窗口小部件上检测多点触摸,并检查按钮上是否有触摸位置。您可以为此上传APK吗?如何触发同时触摸??多指触摸?是的。有时很难重新生成问题。需要使用多个手指同时触摸(有时是异常触摸)来重新生成问题。当您触摸一个时,您不能禁用其他控件的触摸吗?一次只能触摸一个控件。一旦触摸完成,您就可以启用@SweetWisherヅ 请你再详细一点好吗?
button1.setOnCllickListener(onclicklistenerobject);