Skip to content

Commit 44d6ee0

Browse files
committed
Release 0.2.5
1 parent ae3d07e commit 44d6ee0

8 files changed

Lines changed: 29 additions & 7 deletions

File tree

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ android {
88
compileSdk 34
99
defaultConfig {
1010
applicationId "org.exbin.bined.editor.android"
11-
11+
1212
multiDexEnabled true
1313
minSdk 14
1414
/*
@@ -18,7 +18,7 @@ android {
1818
*/
1919

2020
targetSdk 34
21-
versionCode 12
21+
versionCode 13
2222
versionName "0.2.5"
2323
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
2424
vectorDrawables.generatedDensities = []

app/src/main/java/org/exbin/bined/editor/android/MainActivity.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ public class MainActivity extends AppCompatActivity implements FileDialog.OnFile
154154
private boolean keyboardShown = false;
155155
private boolean dataInspectorShown = true;
156156
private long lastBackKeyPressTime = -1;
157+
private long lastReleaseBackKeyPressTime = -1;
157158
BasicValuesPositionColorModifier basicValuesPositionColorModifier = new BasicValuesPositionColorModifier();
158159

159160
private final BinarySearchService.SearchStatusListener searchStatusListener = new BinarySearchService.SearchStatusListener() {
@@ -718,7 +719,10 @@ public boolean onOptionsItemSelected(MenuItem item) {
718719

719720
return true;
720721
} else if (id == R.id.action_exit) {
721-
releaseFile(this::finish);
722+
releaseFile(() -> {
723+
finish();
724+
System.exit(0);
725+
});
722726

723727
return true;
724728
} else if (id == R.id.code_type) {
@@ -933,6 +937,18 @@ public void releaseFile(Runnable postReleaseAction) {
933937
postReleaseAction.run();
934938
});
935939
builder.setNegativeButton(R.string.button_cancel, null);
940+
builder.setOnKeyListener((dialog, keyCode, event) -> {
941+
if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN) {
942+
if (System.currentTimeMillis() - lastReleaseBackKeyPressTime < DOUBLE_BACK_KEY_INTERVAL) {
943+
postReleaseAction.run();
944+
} else {
945+
lastReleaseBackKeyPressTime = System.currentTimeMillis();
946+
Toast.makeText(MainActivity.this, getResources().getText(R.string.confirm_discard), Toast.LENGTH_SHORT).show();
947+
}
948+
return true;
949+
}
950+
return false;
951+
});
936952
AlertDialog alertDialog = builder.create();
937953
alertDialog.show();
938954
}

app/src/main/java/org/exbin/bined/highlight/android/SearchCodeAreaColorAssessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public Integer getPositionTextColor(long rowDataPosition, int byteOnRow, int cha
138138
@Nullable
139139
@Override
140140
public Integer getPositionBackgroundColor(long rowDataPosition, int byteOnRow, int charOnRow, CodeAreaSection section, boolean inSelection) {
141-
if (!matches.isEmpty() && charOnRow < charactersPerRow - 1) {
141+
if (!matches.isEmpty() && charOnRow < charactersPerRow) {
142142
long dataPosition = rowDataPosition + byteOnRow;
143143
if (currentMatchIndex >= 0) {
144144
SearchMatch currentMatch = matches.get(currentMatchIndex);

app/src/main/res/values-cs/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
<string name="save_as_file">Uložit jako soubor</string>
6161
<string name="file_modified">Soubor byl upraven</string>
6262
<string name="confirm_exit">Stiskněte znovu pro ukončení</string>
63+
<string name="confirm_discard">Stiskněte znovu pro zahození změn</string>
6364
<string name="storage_permission_is_not_granted">Není uděleno oprávnění k úložišti</string>
6465
<string name="storage_permission_request">Je třeba povolit oprávnění úložiště</string>
6566

app/src/main/res/values-hi/strings.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
<string name="select_file">एक फ़ाइल चुनें</string>
6161
<string name="save_as_file">फ़ाइल के रूप में सहेजें</string>
6262
<string name="file_modified">फ़ाइल को संशोधित किया गया</string>
63-
<string name="confirm_exit">Press again to exit</string>
63+
<string name="confirm_exit">बाहर निकलने के लिए फिर से दबाएँ</string>
64+
<string name="confirm_discard">परिवर्तनों को त्यागने के लिए पुनः दबाएँ</string>
6465
<string name="storage_permission_is_not_granted">स्टोरेज अनुमति नहीं दी गई</string>
6566
<string name="storage_permission_request">स्टोरेज अनुमतियाँ सक्षम करने की आवश्यकता है</string>
6667

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
<string name="save_as_file">Save as file</string>
6262
<string name="file_modified">File was modified</string>
6363
<string name="confirm_exit">Press again to exit</string>
64+
<string name="confirm_discard">Press again to discard changes</string>
6465
<string name="storage_permission_is_not_granted">Storage permission is not granted</string>
6566
<string name="storage_permission_request">Need to enable storage permissions</string>
6667

changes.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
0.2.5
2-
- Double backpress exists app
1+
0.2.5 (2025-05-07)
2+
- Double back key press exists app
33
- Threaded search
44
- Bug fixes
55

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- Double back key press exists app
2+
- Threaded search
3+
- Bug fixes

0 commit comments

Comments
 (0)