android ScrollView 点击事件 ,求大神 急急急。。
<ScrollView
android:layout_width="fill_parent"
android:layout_height="0.0dip"
android:layout_weight="1.0" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/pgc_btn"
style="@style/left_drawer_item_layout"
android:visibility="gone" >
<TextView
android:id="@+id/pgc_name"
style="@style/left_drawer_item_text"
android:drawableLeft="@drawable/ic_drawer_pgc" />
</RelativeLayout>
<ImageView style="@style/left_drawer_item_line" />
<RelativeLayout
android:id="@+id/search_btn"
style="@style/left_drawer_item_layout" >
<TextView
style="@style/left_drawer_item_text"
android:drawableLeft="@drawable/ic_drawer_search"
android:text="@string/left_drawer_item_search" />
</RelativeLayout>
</LinearLayout>
</<ScrollView>
请问大神,红色部分怎么做一个点击事件啊,通过id看,应该是一个button,做button的点击事件就可以了,但是,事实上不行,用 Button searchButton = (Button) findViewById(R.Id.search_btn.) 会出现空指异常,
麻烦问下,大神,红色部分怎么做点击事件呢? 这个是别人的代码,没太懂