我的布局中有很多按钮,他们工作得很好。我想把两个按钮放在同一行,所以我将LinearLayout设置为水平,但是当我这样做时,第二个按钮的click事件不起作用。它不显示我的TextViewAndroid的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>
如果我删除它工作正常的LinearLayout中,但我想的LinearLayout,因为我想两个按钮是在同一行。
它看起来很好可以把完整的布局和代码在这里......... –
@DheereshSingh这里的XML布局http://www.mediafire.com/?af87gxppl76ad0c和这里的活动http://www.mediafire .com /?dgmz1z42sz3fxdn,按钮不起作用是ShotHint – user1476841
@DheereshSingh你离开了吗? – user1476841