2015-01-31 2 views
-1

안에 버튼이 5 개 있습니다.두 개의 서로 다른 버튼을 동시에 터치하면 다른 버튼이 트리거됩니다. (가운데 하나)

내 문제가 & 오른쪽 대부분의 버튼 중동 버튼을 트리거 가장 왼쪽에 동시 터치입니다.

나는

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> 

입니까?

참고 : 나는 사전에 안드로이드 JellyBean4.1.2에 감사의

부지를하고 있어요.

의 작동 여부를

그냥 내가 밀어 수는 없습니다 가정

button1.setOnCllickListener(onclicklistenerobject); 
+0

APK를 업로드 할 수 있습니까? –

+0

발화 방법 * 동시 터치 * ?? 멀티 손가락 터치? –

+0

예. 때때로 문제를 다시 생성하기가 어렵습니다. 문제를 다시 발생 시키려면 멀티 핑거를 사용하여 동시 터치 (때로는 비정상적인 터치)가 필요합니다. –

답변

0

나도 몰라 한 번에 여러 개의 주식 단추 (android.widget.button).

부모 버튼에서 직접 터치하거나 멀티 터치를 감지하고 터치 위치가 버튼에 있는지 확인할 수 있습니다.

0

처럼 자바 코드에서 동적으로 온 클릭 리스너를 설정하려고하면