Skip to content

Commit

Permalink
Release 0.2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hajdam committed Sep 5, 2024
1 parent a9178d6 commit 89ed940
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 17 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ android {
minSdkVersion 27
targetSdkVersion 34
versionCode 4
versionName "0.2.1-SNAPSHOT"
versionName "0.2.0.1"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
signingConfig signingConfigs.release
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,15 @@ public void keyPressed(KeyEvent keyEvent) {
// keyEvent.consume();
break;
}
case KeyEvent.KEYCODE_DEL: {
case KeyEvent.KEYCODE_FORWARD_DEL: {
EditMode editMode = ((EditModeCapable) codeArea).getEditMode();
if (editMode == EditMode.EXPANDING) {
deletePressed();
// keyEvent.consume();
}
break;
}
case KeyEvent.KEYCODE_BACK: {
case KeyEvent.KEYCODE_DEL: {
EditMode editMode = ((EditModeCapable) codeArea).getEditMode();
if (editMode == EditMode.EXPANDING) {
backSpacePressed();
Expand Down
31 changes: 20 additions & 11 deletions app/src/main/java/org/exbin/bined/editor/android/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,25 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {

@Override
public boolean onKey(View view, int keyCode, KeyEvent keyEvent) {
if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) {
keyListener.onKeyDown(view, editable, keyCode, keyEvent);
processKeys(keyEvent);
} else if (keyEvent.getAction() == KeyEvent.ACTION_UP) {
commandHandler.keyPressed(keyEvent);
} else {
keyListener.onKeyOther(view, editable, keyEvent);
processKeys(keyEvent);
try {
if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) {
if (keyEvent.getKeyCode() == KeyEvent.KEYCODE_DEL || keyEvent.getKeyCode() == KeyEvent.KEYCODE_FORWARD_DEL) {
commandHandler.keyPressed(keyEvent);
} else {
keyListener.onKeyDown(view, editable, keyCode, keyEvent);
processKeys(keyEvent);
}
} else if (keyEvent.getAction() == KeyEvent.ACTION_UP) {
commandHandler.keyPressed(keyEvent);
} else {
keyListener.onKeyOther(view, editable, keyEvent);
processKeys(keyEvent);
}
return true;
} catch (Exception ex) {
// ignore
}
return true;
return false;
}

private void processKeys(KeyEvent keyEvent) {
Expand Down Expand Up @@ -539,11 +548,11 @@ public void buttonActionInsert(View view) {
}

public void buttonActionDelete(View view) {
codeArea.getCommandHandler().keyPressed(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL));
codeArea.getCommandHandler().keyPressed(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_FORWARD_DEL));
}

public void buttonActionBk(View view) {
codeArea.getCommandHandler().keyPressed(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK));
codeArea.getCommandHandler().keyPressed(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL));
}

public void buttonActionTab(View view) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,12 @@ public void keyPressed(KeyEvent keyEvent) {
}
break;
}
case KeyEvent.KEYCODE_DEL: {
case KeyEvent.KEYCODE_FORWARD_DEL: {
deletePressed();
// keyEvent.consume();
break;
}
case KeyEvent.KEYCODE_BACK: {
case KeyEvent.KEYCODE_DEL: {
backSpacePressed();
// keyEvent.consume();
break;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<string name="action_exit">Exit</string>
<string name="exampleString">Test</string>
<string name="app_about">Name: BinEd - Binary/Hex Editor\nVersion: 0.2.1 SNAPSHOT\nVendor: <a href="https://exbin.org">ExBin Project</a>\nLicense: <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>\nHomepage: <a href="https://bined.exbin.org/android">https://bined.exbin.org/android</a></string>
<string name="app_about">Name: BinEd - Binary/Hex Editor\nVersion: 0.2.0.1\nVendor: <a href="https://exbin.org">ExBin Project</a>\nLicense: <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>\nHomepage: <a href="https://bined.exbin.org/android">https://bined.exbin.org/android</a></string>
<string name="bined_logo_description">BinEd Logo</string>
<string name="pref_header_appearance">Appearance</string>
<string name="title_activity_settings2">SettingsActivity2</string>
Expand Down

0 comments on commit 89ed940

Please sign in to comment.