在androd中的listview中,假如每一项是个buuton,要针对这个button有响应
事件,比如跳到另外一个activity的话,可以这样做:

<Button         android:id="@+id/btnaccno"         style="?android:attr/buttonStyleSmall"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="View"         android:focusable="false" android:focusableInTouchMode="false"  android:onClick="myClick"         />

注意的是必须加上 android:focusable="false"

android:focusableInTouchMode="false"

然后就可以写响应的事件了
public void myClick (View v) ..........

更多相关文章

  1. Android中listview中的button
  2. Android(安卓)滑动效果入门篇(一)—— ViewFlipper
  3. android -h 'xcopy' 不是内部或外部命令
  4. Android中listview中的button
  5. Android中listview中的button
  6. Android触摸屏幕时间-android学习之旅(三)
  7. android fragment ontouch 事件
  8. Android中listview中的button
  9. Android之Input子系统事件分发流程

随机推荐

  1. android 限定 EditText字符输入个数
  2. android life cycle
  3. ok6410 android driver(7)
  4. android 多媒体部分学习笔记十--简单视频
  5. Android handler用法详解二(例2)
  6. Android浏览器开发 WebView setBlockNetw
  7. android java.lang.IllegalStateExceptio
  8. android 各版本与api值 对应表
  9. Android - 对话框(Dialog)和通知(Notific
  10. Android之 BatteryService