slightly increased the Backspace swiping sensitivity
This commit is contained in:
parent
7864c24850
commit
7aa3ab5102
2 changed files with 32 additions and 3 deletions
|
|
@ -78,9 +78,31 @@ public class SoftKeyBackspace extends SwipeableKey {
|
|||
|
||||
@Override
|
||||
protected void handleStartSwipeX(float position, float delta) {
|
||||
if (!isActionPerformed && validateTT9Handler()) {
|
||||
if (!isActionPerformed) {
|
||||
isActionPerformed = true;
|
||||
tt9.onBackspace(SettingsStore.BACKSPACE_ACCELERATION_REPEAT_DEBOUNCE);
|
||||
deleteWord();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void handleSwipeX(float position, float delta) {
|
||||
handleStartSwipeX(position, delta);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void handleEndSwipeX(float position, float delta) {
|
||||
if (isActionPerformed) {
|
||||
return;
|
||||
}
|
||||
|
||||
isActionPerformed = true;
|
||||
|
||||
if (delta < SWIPE_X_THRESHOLD) {
|
||||
deleteText();
|
||||
} else {
|
||||
deleteWord();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -112,6 +134,13 @@ public class SoftKeyBackspace extends SwipeableKey {
|
|||
}
|
||||
|
||||
|
||||
private void deleteWord() {
|
||||
if (validateTT9Handler()) {
|
||||
tt9.onBackspace(SettingsStore.BACKSPACE_ACCELERATION_REPEAT_DEBOUNCE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected int getNoEmojiTitle() {
|
||||
return R.string.virtual_key_del;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ abstract public class SwipeableKey extends SoftKey {
|
|||
|
||||
private int swipeCount = 0;
|
||||
private long swipeProcessingTime = 0;
|
||||
private long swipeProcessingTimeAverage = 40;
|
||||
private long swipeProcessingTimeAverage = 50;
|
||||
|
||||
|
||||
public SwipeableKey(Context context) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue