Skip to content

Commit

Permalink
Smother delete swipe and translations
Browse files Browse the repository at this point in the history
  • Loading branch information
rkkr committed Aug 8, 2019
1 parent 111cd6b commit 18a4232
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "rkr.simplekeyboard.inputmethod"
minSdkVersion 19
targetSdkVersion 28
versionCode 60
versionName "3.10"
versionCode 61
versionName "3.11"
}
buildTypes {
release {
Expand Down
Expand Up @@ -632,10 +632,11 @@ private void onMoveEventInternal(final int x, final int y, final long eventTime)
if (oldKey != null && oldKey.getCode() == Constants.CODE_DELETE && Settings.getInstance().getCurrent().mDeleteSwipeEnabled) {
//Delete slider
int steps = (x - mStartX) / sPointerStep;
if (steps < 0 || mCursorMoved) {
if (steps != 0) {
sTimerProxy.cancelKeyTimersOf(this);
mCursorMoved = steps < 0;
sListener.onMoveDeletePointer(-steps);
mCursorMoved = true;
mStartX += steps * sPointerStep;
sListener.onMoveDeletePointer(steps);
}
return;
}
Expand Down
Expand Up @@ -761,17 +761,17 @@ public void onMovePointer(int steps) {

@Override
public void onMoveDeletePointer(int steps) {
if (steps < 0)
return;

int end = mInputLogic.mConnection.getExpectedSelectionEnd();
int start = end - steps;
int start = mInputLogic.mConnection.getExpectedSelectionStart() + steps;
if (start > end)
return;
mInputLogic.mConnection.setSelection(start, end);
}

@Override
public void onUpWithDeletePointerActive() {
mInputLogic.sendDownUpKeyEvent(KeyEvent.KEYCODE_DEL);
if (mInputLogic.mConnection.hasSelection())
mInputLogic.sendDownUpKeyEvent(KeyEvent.KEYCODE_DEL);
}

private boolean isShowingOptionDialog() {
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/values-si-rLK/strings.xml
Expand Up @@ -56,11 +56,11 @@
<string name="prefs_keypress_sound_volume_settings">"යතුරු එබීම් හඬ තීව්‍රතාවය"</string>
<string name="prefs_key_longpress_timeout_settings">"යතුරු දිගු එබීම් ප්‍රමාදය"</string>
<string name="button_default">"සුපුරුදු"</string>
<string name="prefs_keyboard_height_settings">Keyboard height</string>
<string name="keyboard_color">Set custom keyboard color</string>
<string name="hide_special_chars">Hide special characters</string>
<string name="hide_language_switch_key">Hide language switch key</string>
<string name="show_number_row">Show separate number row</string>
<string name="prefs_keyboard_height_settings">කීබෝඩයේ උස</string>
<string name="keyboard_color">කැමති පාටක් යොදන්න</string>
<string name="hide_special_chars">විශේශ අක්ශර සඟවන්න</string>
<string name="hide_language_switch_key">භාෂාව මාරුකරන යතුර සඟවන්න</string>
<string name="show_number_row">වෙනමම අංක පේලියක් පෙන්වන්න</string>
<string name="space_swipe">Space swipe cursor move</string>
<string name="delete_swipe">Delete swipe</string>
</resources>
14 changes: 7 additions & 7 deletions app/src/main/res/values-sq-rAL/strings.xml
Expand Up @@ -56,11 +56,11 @@
<string name="prefs_keypress_sound_volume_settings">"Volumi i tingullit të tastit"</string>
<string name="prefs_key_longpress_timeout_settings">"Vonesa e shtypjes së gjatë të tastit"</string>
<string name="button_default">"I parazgjedhur"</string>
<string name="prefs_keyboard_height_settings">Keyboard height</string>
<string name="keyboard_color">Set custom keyboard color</string>
<string name="hide_special_chars">Hide special characters</string>
<string name="hide_language_switch_key">Hide language switch key</string>
<string name="show_number_row">Show separate number row</string>
<string name="space_swipe">Space swipe cursor move</string>
<string name="delete_swipe">Delete swipe</string>
<string name="prefs_keyboard_height_settings">Lartësia e tastierës</string>
<string name="keyboard_color">Vendos ngjyrë tastiere me porosi</string>
<string name="hide_special_chars">Fshih karakteret speciale</string>
<string name="hide_language_switch_key">Fshi çelësin për ndryshimin e gjuhës</string>
<string name="show_number_row">Shfaq numrat në rresht të ndarë</string>
<string name="space_swipe">Lëvizjet e kursorit në tabin e hapsirës</string>
<string name="delete_swipe">Fshij rrëshqitjet</string>
</resources>

0 comments on commit 18a4232

Please sign in to comment.