這是我的佈局文件代碼按鈕不可點擊的滾動視圖Android
一切工作正常,但按鈕不可點擊。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/maps"
android:gravity="center_horizontal"
android:orientation="vertical">
<include layout="@layout/custom_actionbar" />
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingBottom="30dp">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/pf_color"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:text="TRACK"
android:textSize="20dp" />
</LinearLayout>
</ScrollView>
</LinearLayout>
請幫忙解決這個問題。我很感謝你。 我無法理清什麼是實際問題。我試過android:clickable =「true」但仍然是相同的問題 在此先感謝。
你設置了clicklistener這個按鈕在java文件 –
我們可以有活動嗎? – BAAAZINGA
加入onCLickListener之後是工作,但不作爲按鈕 –