二零二三年 优质公开课触摸事件.pptVIP

  • 1
  • 0
  • 约1.77千字
  • 约 7页
  • 2023-05-25 发布于安徽
  • 举报
《通信业务开发》课程触摸事件 触摸Touch事件PART 18-9事件特性监听接口实例演示 事件特性示例触摸屏幕后产生的事件,常用于屏幕绘图接口: View.OnTouchListener. onTouch()实现步骤:获取监听对象:创建监听器类, 实现View.OnTouchListener注册监听器: setOnTouchListener()规则 监听接口public interface View.OnTouchListener { public abstract boolean onTouch (View v, MotionEvent event) ;}void setOnTouchListener(View.OnTouchListener ? l ) 实例演示LinearLayout???????xmlns:android=/apk/res/android??????android:layout_width=match_parent??????android:layout_height=match_parent?????????ImageView??????????android:id=@+id/img??????????android:layout_width=wrap_content??????????an

文档评论(0)

1亿VIP精品文档

相关文档