public TouchScreenRegulator(final Context context, final ProcessMotionEvent view) { mView = view; mNeedsSuddenJumpingHack = Boolean.parseBoolean( ResourceUtils.getDeviceOverrideValue( context.getResources(), R.array.sudden_jumping_touch_event_device_list)); }
public GestureStrokeParams(final TypedArray mainKeyboardViewAttr) { mStaticTimeThresholdAfterFastTyping = mainKeyboardViewAttr.getInt( R.styleable.MainKeyboardView_gestureStaticTimeThresholdAfterFastTyping, DEFAULT.mStaticTimeThresholdAfterFastTyping); mDetectFastMoveSpeedThreshold = ResourceUtils.getFraction( mainKeyboardViewAttr, R.styleable.MainKeyboardView_gestureDetectFastMoveSpeedThreshold, DEFAULT.mDetectFastMoveSpeedThreshold); mDynamicThresholdDecayDuration = mainKeyboardViewAttr.getInt( R.styleable.MainKeyboardView_gestureDynamicThresholdDecayDuration, DEFAULT.mDynamicThresholdDecayDuration); mDynamicTimeThresholdFrom = mainKeyboardViewAttr.getInt( R.styleable.MainKeyboardView_gestureDynamicTimeThresholdFrom, DEFAULT.mDynamicTimeThresholdFrom); mDynamicTimeThresholdTo = mainKeyboardViewAttr.getInt( R.styleable.MainKeyboardView_gestureDynamicTimeThresholdTo, DEFAULT.mDynamicTimeThresholdTo); mDynamicDistanceThresholdFrom = ResourceUtils.getFraction( mainKeyboardViewAttr, R.styleable.MainKeyboardView_gestureDynamicDistanceThresholdFrom, DEFAULT.mDynamicDistanceThresholdFrom); mDynamicDistanceThresholdTo = ResourceUtils.getFraction( mainKeyboardViewAttr, R.styleable.MainKeyboardView_gestureDynamicDistanceThresholdTo, DEFAULT.mDynamicDistanceThresholdTo); mSamplingMinimumDistance = ResourceUtils.getFraction( mainKeyboardViewAttr, R.styleable.MainKeyboardView_gestureSamplingMinimumDistance, DEFAULT.mSamplingMinimumDistance); mRecognitionMinimumTime = mainKeyboardViewAttr.getInt( R.styleable.MainKeyboardView_gestureRecognitionMinimumTime, DEFAULT.mRecognitionMinimumTime); mRecognitionSpeedThreshold = ResourceUtils.getFraction( mainKeyboardViewAttr, R.styleable.MainKeyboardView_gestureRecognitionSpeedThreshold, DEFAULT.mRecognitionSpeedThreshold); }