当前位置: 首页 > news >正文

怎么做记步数的程序到网站做阿里云网站的公司

怎么做记步数的程序到网站,做阿里云网站的公司,it外包考核,网站制作一般哪家好上篇回顾#xff1a;ArkTS开发系列之事件#xff08;2.8.1触屏、键鼠、焦点事件#xff09; 本篇内容#xff1a;ArkTS开发系列之事件#xff08;2.8.2手势事件#xff09; 一、绑定手势方法 1. 常规手势绑定方法 Text(手势).fontSize(44).gesture(TapGesture().onAct…上篇回顾ArkTS开发系列之事件2.8.1触屏、键鼠、焦点事件 本篇内容ArkTS开发系列之事件2.8.2手势事件 一、绑定手势方法 1. 常规手势绑定方法 Text(手势).fontSize(44).gesture(TapGesture().onAction((event) {console.error(event: JSON.stringify(event))}))2. 带优先级的手势绑定方法 需要注意子父组件绑定相同级别手势时子组件优先响应如果父组件绑定优先级手势方法子组件为普通绑定手势方法则父组件优先响应 .priorityGesture(TapGesture().onAction((event){console.error(parentGesture: JSON.stringify(event))}))3. 并行手势绑定方法 当父组件绑定此手势方法时父子组件可同时响应手势 .parallelGesture(TapGesture().onAction((event){console.error(parent event: JSON.stringify(event))}))二、单一手势 1. 点击手势tapGesture Text(手势).fontSize(44).gesture(TapGesture().onAction((event) {console.error(event: JSON.stringify(event))}))2. 长按手势longPressGesture LongPressGesture(value?:{fingers?:number; repeat?:boolean; duration?:number})fingers :触发最少手指数默认1repeat 是否连续触发 默认falseduration 长按多久触发默认500 Text(长按手势).fontSize(55).gesture(LongPressGesture({fingers: 1, repeat: true, duration: 300})//fingers :触发最少手指数默认1 repeat 是否连续触发 默认false duration 长按多久触发默认500.onAction(event{console.error(longPress: JSON.stringify(event))}))3. 拖动手势PanGesture PanGesture(value?:{ fingers?:number; direction?:PanDirection; distance?:number})fingers: 触发手势最少手指数默认1direction触发手势方向默认值Pandirection.Alldistance触发手势的最少距离单位为vp默认5vp有点类似于onTouch事件 Text(拖动手势).fontSize(44).gesture(PanGesture().onActionStart(event {console.error(Pan start: JSON.stringify(event))}).onActionUpdate(event {console.error(Pan update: JSON.stringify(event))}).onActionEnd(event {console.error(Pan end: JSON.stringify(event))}).onActionCancel(() {console.error(Pan cancel: )}))4. 撮合手势PinchGesture) PinchGesture(value?:{fingers?:number; distance?:number})fingers: 触发手势最少手指数默认2, 最大值为5distance触发手势的最少距离单位为vp默认5vp Text(撮合手势).fontSize(44).gesture(PinchGesture().onActionStart(event {console.error(Pinch start: JSON.stringify(event))}).onActionUpdate(event {console.error(Pinch update: JSON.stringify(event))}).onActionEnd(event {console.error(Pinch end: JSON.stringify(event))}).onActionCancel(() {console.error(Pinch cancel: )}))5. 旋转手势RotationGesture) RotationGesture(value?:{fingers?:number; angle?:number})fingers: 触发手势最少手指数默认2, 最大值为5angle: 触发手势的最小改变度数单位是deg默认为1deg Text().fontSize(44).gesture(RotationGesture({fingers:2}).onActionStart(event {console.error(Rotation start: JSON.stringify(event))}).onActionUpdate(event {console.error(Rotation update: JSON.stringify(event))}).onActionEnd(event {console.error(Rotation end: JSON.stringify(event))}).onActionCancel(() {console.error(Rotation cancel: )}))6. 滑动手势SwipeGesture) SwipeGesture(value?:{fingers?:number; direction?:SwipeDirection; speed?:number})fingers: 触发手势最少手指数默认1, 最大值为10direction: 触发手势的方向默认值是 SwipeDirection.Allspeed: 触发手势的最小滑动速度单位为vp/s默认值为100vp/s .gesture(SwipeGesture({ direction: SwipeDirection.Vertical }).onAction(event {console.error(Swipe : JSON.stringify(event))}))三、组合手势 GestureGroup(mode:GestureMode, ...gesture:GestureType[])mode: 声明组合手势的类型 gesture 手势数组 1. 顺序组合 .gesture(GestureGroup(GestureMode.Sequence,SwipeGesture({ direction: SwipeDirection.Vertical }).onAction(event {console.error(Swipe : JSON.stringify(event))}),LongPressGesture().onAction(event {console.error(longPress : JSON.stringify(event))})))2. 并行组合 .gesture(GestureGroup(GestureMode.Parallel,SwipeGesture({ direction: SwipeDirection.Vertical }).onAction(event {console.error(Swipe : JSON.stringify(event))}),LongPressGesture().onAction(event {console.error(longPress : JSON.stringify(event))})))3. 互斥组合 .gesture(GestureGroup(GestureMode.Exclusive,SwipeGesture({ direction: SwipeDirection.Vertical }).onAction(event {console.error(Swipe : JSON.stringify(event))}),LongPressGesture().onAction(event {console.error(longPress : JSON.stringify(event))})))
http://www.dnsts.com.cn/news/60379.html

相关文章:

  • 网站备案幕网站上的小动画咋做
  • 自己有网站怎么赚钱如何做品牌推广网站
  • 查关键词热度的网站wordpress文章手机平铺
  • 洛阳霞光做网站的公司模板厂家
  • 王者荣耀网站开发目的好的策划方案网站
  • 危险网站怎么办创新建设资金网站
  • 团购网站开发语言公众号文章导入wordpress
  • 微信小程序模板网站网页添加兼容性站点
  • 自做网站域名重定向wordpress文件路径
  • 深圳高端企业网站建设公司微分销商城网站建设
  • 网站开发需要什么技术人员通辽网站制作公司
  • 江西网站开发费用湖南长沙关键词推广电话
  • 网站的关键词和描述重庆网站推广转化率
  • 网站备案增加域名解析实体店营销策划公司
  • 网站给挂黑链室内设计师网站十大网站
  • 网站建设数据库ER图怎么画网站美工设计流程
  • 微信如何绑定网站如何让自己做的网站可以播放歌曲
  • 做短视频的网站网站功能优化的方法
  • 做网站背景的图片大小巴中做网站公司
  • 网站如何seo推广如何做网站 新手 个人 教程
  • 有没有免费做物流推荐的网站qnap如何搭wordpress
  • 网站建设第一步云平台网站优化
  • 绍兴做网站的公司wordpress怎么修改登录地址
  • asp.net的网站开发网站建设存在困难
  • 推广网站弄哪家好建设宁夏分行互联网站
  • 产品导航网站源码建筑用塑料模板价格
  • 天津高端网站设计公司企业网站宣传
  • 响应式网站seo用jsp做的可运行的网站
  • 驻马店网站建设电话上海中小企业网站建设
  • 龙岗永湖网站建设网站脑图怎么做