summaryrefslogtreecommitdiffstats
path: root/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/hoopajoo/android/SoftKeys/SoftKeysService.java')
-rw-r--r--src/net/hoopajoo/android/SoftKeys/SoftKeysService.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java b/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java
index faa2a14..d5e15d7 100644
--- a/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java
+++ b/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java
@@ -44,6 +44,7 @@ import android.widget.ImageButton;
import android.widget.LinearLayout;
public class SoftKeysService extends Service {
+ private InputSmoother i;
private View mView;
private View mBumpView;
private boolean auto_hide;
@@ -169,8 +170,11 @@ public class SoftKeysService extends Service {
mDraggingView = true;
mDidDrag = true;
- int currX = (int)me.getRawX();
- int currY = (int)me.getRawY();
+ i.addPoint( (int)me.getRawX(), (int)me.getRawY() );
+ i.updateOutliers();
+ int[] pts = i.getCurrent();
+ int currX = pts[ 0 ];
+ int currY = pts[ 1 ];
// make our deltas work relative to movement, y
int dx = currX - mDraggingOrigX;
@@ -215,6 +219,7 @@ public class SoftKeysService extends Service {
WindowManager wm = (WindowManager)getSystemService(WINDOW_SERVICE);
wm.updateViewLayout( root, l );
+
return( true );
}
}
@@ -300,6 +305,8 @@ public class SoftKeysService extends Service {
wm.addView( mBumpView, makeOverlayParams() );
wm.addView( mView, makeOverlayParams() );
+ i = new InputSmoother( 5 );
+
initOrientation();
}