2011-02-28 8 views
2

ImageView 및 SlidingDrawer가 포함 된 RelativeLayout을 만들었습니다. ImageView에 onClickListener를 설정하고 SlidingDrawer의 내용 부분에 다른 하나를 설정했습니다. SlidingDrawer가 열려 있고 내용 부분을 클릭하면 ImageView의 onClick 이벤트가 트리거됩니다.SlidingDrawer의 onClick 이벤트가 트리거되지 않았습니다.

왜? SlidingDrawer가 ImageView 위에 있지 않습니까?

감사

부울 onInterceptTouchEvent 문서에 대한주기 (MotionEvent 이벤트)

,이 방법 "요격 모든 터치 스크린 모션 이벤트를"의 구현과 마우스 evensts을 가로 챌 수

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:background="@drawable/background" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 

    <ImageView 
     android:id="@+id/whip" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" /> 

    <SlidingDrawer 
     android:id="@+id/drawer" 
     android:layout_width="wrap_content" 
     android:layout_height="53dp" 
     android:layout_alignParentBottom="true" 
     android:orientation="horizontal" 

     android:handle="@+id/facebook_icon" 
     android:content="@+id/facebook_contacts"> 

     <ImageView 
      android:id="@+id/facebook_icon" 
      android:layout_width="55dp" 
      android:layout_height="53dp"   
      android:src="@drawable/facebook_handler_off" /> 

     <ImageView android:id="@+id/facebook_contacts" 
       android:layout_width="265dp" 
       android:layout_height="53dp"     
       android:src="@drawable/facebook_content" /> 

    </SlidingDrawer> 

</RelativeLayout> 
+0

이봐, 당신이 이제까지 발견 않았다 솔루션을 봐? 나는 똑같은 문제에 직면하고 있으며 해결책 중 어느 것도 나를 돕지 않는다. – anargund

답변

관련 문제