The invention discloses a method of screen capture by user gesture, which includes the following specific operation steps: S1: gesture monitoring; S2: judging whether gesture operation satisfies three fingers touching screen simultaneously; S3: touch process interception processing, when three fingers touching screen simultaneously, when touching motion event triggers. System (ViewRootImpl) intercepts the transmission process of the touch event; S4: Record the value, record the coordinate value y of the three fingers corresponding to press touch down and lift touch up respectively; S5: Screen shot, when the user lifts his finger, judge whether the gesture action meets the screenshot condition or not, if it meets the screenshot condition, then proceed. Run screenshots and save pictures. The invention provides a simple and direct way for users to screen-capture by means of three-finger underlining or uploading at any position of the mobile screen, which makes the screen-capture operation of users quicker and simpler, and the three-finger operation is not easy to conflict with other screen-scratching operations, and is easy to form relatively fixed user habits.
【技术实现步骤摘要】
一种通过用户手势进行截屏的方法
本专利技术属于智能设备手势控制
,具体涉及一种通过用户手势进行截屏的方法。
技术介绍
截屏是手机用户经常需要用到的一项功能,不管是Android手机还是Iphone都会提供截屏的功能,当前大部分Android手机都是通过按Power键和音量下键触发截屏,或者在快捷开关界面提供一个截屏的快捷开关,而按键截屏需要两只手同时操作,容易误操作,快捷开关点击需要先调出快捷开关界面然后进行点击,操作都不是非常快捷流畅,不利于用户快速及时截屏。
技术实现思路
本专利技术的目的在于提供一种通过用户手势进行截屏的方法,以解决上述
技术介绍
中提出的问题。为实现上述目的,本专利技术提供如下技术方案:一种通过用户手势进行截屏的方法,包括如下具体操作步骤:S1:手势监听,在系统(PhoneWindowManager)中监听用户在手机屏幕任意位置的手势事件;S2:判断,通过系统接口判断手势操作是否满足三指同时触碰屏幕;S3:触摸进程拦截处理,当满足三指同时触碰屏幕时,在touchmove事件触发的时候在系统(ViewRootImpl)中对该touch事件的传递过程进行拦截处理,防止屏幕内容因为手势划动而产生划屏的效果;S4:记录数值,记录下三指分别对应的按下touchdown的坐标值y值和抬起touchup的坐标值y值;S5:截图,当用户抬起手指时,判断手势动作是否满足截屏条件,若满足则进行截屏操作,并保存图片。优选的,步骤S5中判断满足截屏的条件是:用户抬起手指时,判断每个手指touchup的坐标值y值和touchdown的坐标值y值之差,当三指都大 ...
【技术保护点】
1.一种通过用户手势进行截屏的方法,其特征在于:包括如下具体操作步骤:S1:手势监听,在系统(PhoneWindowManager)中监听用户在手机屏幕任意位置的手势事件;S2:判断,通过系统接口判断手势操作是否满足三指同时触碰屏幕;S3:触摸进程拦截处理,当满足三指同时触碰屏幕时,在touch move事件触发的时候在系统(ViewRootImpl)中对该touch事件的传递过程进行拦截处理,防止屏幕内容因为手势划动而产生划屏的效果;S4:记录数值,记录下三指分别对应的按下touch down的坐标值y值和抬起touch up的坐标值y值;S5:截图,当用户抬起手指时,判断手势动作是否满足截屏条件,若满足则进行截屏操作,并保存图片。
【技术特征摘要】
1.一种通过用户手势进行截屏的方法,其特征在于:包括如下具体操作步骤:S1:手势监听,在系统(PhoneWindowManager)中监听用户在手机屏幕任意位置的手势事件;S2:判断,通过系统接口判断手势操作是否满足三指同时触碰屏幕;S3:触摸进程拦截处理,当满足三指同时触碰屏幕时,在touchmove事件触发的时候在系统(ViewRootImpl)中对该touch事件的传递过程进行拦截处理,防止屏幕内容因为手势划动而产生划屏的效果;S4:记录数值,记录下三指分别对应的按下touchdown的坐标值y值和抬起touch...
【专利技术属性】
技术研发人员:鹿鹏,龙刚,林宋伟,刘湘,蔡泗侠,魏国,
申请(专利权)人:深圳市保千里电子有限公司,
类型:发明
国别省市:广东,44
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。