增加对用户的触摸灵敏度 [英] increase sensitivity to user touch

查看:100
本文介绍了增加对用户的触摸灵敏度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自定义表布局,其中每一行是滑动就能视图。一切工作正常,除了有当用户开始滑动时的观点开始移动之间的连续延迟。有没有办法减少延迟启动的方式?

我建立我的表布局一个异步任务里。所以刚开始我得到大约需要使用钩子错误。因为我不知道该怎么办,我使用 runOnUiThread 来处理这个问题code。所以现在我想知道如果这对反应迟缓触摸的原因。这里是code

  activity.runOnUiThread(新的Runnable(){
  公共无效的run(){
handler.post(mResizeViews);
  }
});


解决方案

这个问题可能是当用户滑动发生什么?
如果你做一些严重的工作,例如充气布局时,用户开始滑动。

所以,当检查启动用户滑动发生什么

I have a custom table layout where each row is a slide-able view. Everything is working fine, except there is a continuous delay between when a user starts sliding a when the view starts moving. Is there a way to reduce that starting delay?

I am building my table layout inside an async task. So at first I was getting an error about needing to use a looper. Since I didn't know how to do that I use runOnUiThread to handle the problem code. So now I am wondering if that's the reason for the slow response to touch. Here is the code

activity.runOnUiThread(new Runnable() {
  public void run() {
handler.post(mResizeViews);
  }
});

解决方案

The question may be "What happen when user sliding?" if you do some heavily task such as inflate layout when user start slide.

So, check what happen when user start sliding

这篇关于增加对用户的触摸灵敏度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆