New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Hashcode
Old
#1  
Hashcode's Avatar
Recognized Developer - OP
Thanks Meter 11178
Posts: 1,916
Join Date: Sep 2011

 
DONATE TO ME
Default Adjusting the "Touch Slop" in CM9 (from 8 to 16)

I responded in the larger CM9 thread but it will probably be buried in a day or so. And I think this will help devs who are working on CM9 builds at the moment.
------------------------------------------------------------------
Quote:
Originally Posted by jdommer View Post
The correct settings for the our touch screen appear to be:

Code:
touch.deviceType = touchScreen
touch.orientationAware = 1

# Size
# Based on empirical measurements, we estimate the size of the contact
# using size = sqrt(area) * 28 + 0.
touch.size.calibration = default
touch.size.scale = 1
touch.size.bias = 0
touch.size.isSummed = 0

# Pressure
# Driver reports signal strength as pressure.
#
# A normal index finger touch typically registers about 80 signal strength
# units although we don't expect these values to be accurate.
touch.pressure.calibration = none
touch.pressure.scale = 1.0

# Orientation
touch.orientation.calibration = default
Unfortunately, that doesn't do anything for the tap/drag problem. The KF can't distinguish pressure or size of touch.

Looks like Android decides any touch where x1-x2 or y1-y2 > 8 as a drag. I can't find any place that that value is configurable after scouring the internets all morning, but if it could simply be turned up to maybe 12 that would probably alleviate 90% of our taps as drags problems.

Anyone have any idea, is there a config file or is that compiled in and has to be changed at source? I feel competent enough to dink with config files, but can't compile crap.
I build from the KFire-Android git as a testing model and i've been experimenting with a setting of "16" for touch slop, and in my opinion it's working much better.. could probably be 12, but who knows. I'm having a much easier time selecting things like Beautiful Widgets 1x1 Toggles, where before it was a trial of patience and about 10 touches.

This is a setting in the overlay config.xml file. I went ahead and committed it this morning to the KFire-Android org at Github:
https://github.com/KFire-Android/dev...5b9831cb6a0663
The Following 4 Users Say Thank You to Hashcode For This Useful Post: [ Click to Expand ]
 
randallu
Old
#2  
Member
Thanks Meter 5
Posts: 45
Join Date: Dec 2010
Location: Palo Alto, CA
Is the code that uses the clickSlop in android hackable for KFire?

I found on my device that most of the noise on taps was occurring in the last few samples (like the touchscreen firmware is averaging in some bad samples on finger release) and that by dropping the last few touch events I got much better touch response in my app. I'm not sure where to put such a state machine in the framework, though, or how to have it only for KFire...

(My state machine would buffer 3 samples ahead for the first 20 samples, and then drop the last 3 samples on finger up and patch N-3 to be a finger up instead of a move -- after 20 samples it just passed everything through with no buffering to avoid adding latency to drags).