2012-06-23 2 views
1

레이아웃에 버튼이 많아 잘 작동합니다. 두 개의 버튼을 같은 행에 넣으므로 LinearLayout을 가로로 만들었지 만 두 번째 버튼의 클릭 이벤트는 작동하지 않습니다. 나는 그것이 잘 작동의 LinearLayout을 제거 할 수 있지만 나는 두 개의 버튼이 같은 행에있을 싶어서가있는 LinearLayout를 원한다면 그것은 나에게 나의 텍스트 뷰Android LinearLayout 확인 버튼이 작동하지 않습니다.

<LinearLayout 
     xmlns:android="http://schemas.android.com/apk/res/android" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:orientation="horizontal" > 

     <Button 
      android:id="@+id/bAnswerQuestoinShowChoices" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Show Choices" 
      android:visibility="invisible" /> 

     <Button 
      android:id="@+id/bAnswerQuestionShowHints" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Show Hint 1" 
      android:visibility="invisible" /> 
    </LinearLayout> 

를 표시하지 않습니다.

+1

에게 워프하게된다 그것은 괜찮아요 여기에 완전한 레이아웃과 코드를 넣을 수 있습니다 ......... –

+1

@DheereshSingh 여기의 XML 레이아웃 http://www.mediafire.com/?af87gxppl76ad0c 및 여기의 활동 http : //www.mediafire .com /? dgmz1z42sz3fxdn, 버튼이 작동하지 않습니다. ShotHint – user1476841

+0

@DeereshSingh를 남겨 두셨습니까? – user1476841

답변

0

안드로이드 : layout_height = "match_parent"// <가 ----------------------이 문제는 콘텐츠

<LinearLayout 
     xmlns:android="http://schemas.android.com/apk/res/android" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" //<----------------------this is the issue make it warp content 
     android:orientation="horizontal" > 
+1

정말 고마워요, 고마워요. – user1476841

+0

언제나 환영합니다 ...... :) –

관련 문제