From 80bcb9963259994cfb6497a19709198414aa860a Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Fri, 5 Oct 2012 12:12:54 +0900 Subject: [PATCH] Move gesture detection and recognition paramters to resources Bug: 7032858 Change-Id: I66570a5e21cdeede1eba420c597f440ab61aa941 --- java/res/values/attrs.xml | 17 +++ java/res/values/config.xml | 17 +++ java/res/values/styles.xml | 11 ++ .../inputmethod/keyboard/PointerTracker.java | 14 +- .../keyboard/internal/GestureStroke.java | 132 ++++++++++++------ .../GestureStrokeWithPreviewPoints.java | 4 +- 6 files changed, 149 insertions(+), 46 deletions(-) diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml index 7e8c77e13..88b4da3ae 100644 --- a/java/res/values/attrs.xml +++ b/java/res/values/attrs.xml @@ -127,6 +127,23 @@ + + + + + + + + + + + + + + + + + diff --git a/java/res/values/config.xml b/java/res/values/config.xml index 8e2d43e4e..da9a73401 100644 --- a/java/res/values/config.xml +++ b/java/res/values/config.xml @@ -69,6 +69,23 @@ false + + 350 + + 150% + + 450 + + 300 + 20 + + 600% + 35% + + 16.6666% + + 100 + 550% diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml index 9d3d71607..96d8c905b 100644 --- a/java/res/values/styles.xml +++ b/java/res/values/styles.xml @@ -94,6 +94,17 @@ @anim/language_on_spacebar_fadeout @anim/alt_code_key_while_typing_fadeout @anim/alt_code_key_while_typing_fadein + + @integer/config_gesture_static_time_threshold_after_fast_typing + @fraction/config_gesture_detect_fast_move_speed_threshold + @integer/config_gesture_dynamic_threshold_decay_duration + @integer/config_gesture_dynamic_time_threshold_from + @integer/config_gesture_dynamic_time_threshold_to + @fraction/config_gesture_dynamic_distance_threshold_from + @fraction/config_gesture_dynamic_distance_threshold_to + @fraction/config_gesture_sampling_minimum_distance + @integer/config_gesture_recognition_minimum_time + @fraction/config_gesture_recognition_speed_threshold