Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ protected final void deleteFileOnClick() {
showConfirmationDialog(
R.layout.dialog_action_cannot_be_undo,
R.string.warning,
R.string.delete,
R.string.delete_caps,
(dialog, which) -> runWithProgressDialog(task, post)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public class DeleteNoteOnClick implements MenuItem.OnMenuItemClickListener {
public final class DeleteNoteOnClick implements MenuItem.OnMenuItemClickListener {

private final ActivityBase activity;
private final Note note;
Expand All @@ -38,7 +38,7 @@ public boolean onMenuItemClick(@NonNull MenuItem item) {
DialogInterface.OnClickListener buttonHandler = deleteNoteDialogOnClick();
dialogFactory.getThemedAlertDialogBuilder(R.layout.dialog_action_cannot_be_undo)
.setTitle(R.string.warning)
.setPositiveButton(R.string.delete, buttonHandler)
.setPositiveButton(R.string.delete_caps, buttonHandler)
.setNegativeButton(R.string.no, buttonHandler)
.create()
.show();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public class OpenFilesListOnClick implements MenuItem.OnMenuItemClickListener, View.OnClickListener {
public final class OpenFilesListOnClick implements MenuItem.OnMenuItemClickListener, View.OnClickListener {

private final ActivityBase activity;
private final Note note;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
}

private void changeOpenModeButtonOnClick() {
View anchor = findViewById(R.id.changeOpenModeButton);
View anchor = findViewById(R.id.popupMenuAnchor);
PopupMenu popup = new PopupMenu(this, anchor);
popup.inflate(R.menu.menu_open_node_open_mode);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public class SaveNoteOnClick implements MenuItem.OnMenuItemClickListener {
public final class SaveNoteOnClick implements MenuItem.OnMenuItemClickListener {

private final ActivityBase activity;
private final Note note;
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/layout/activity_open_note.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,13 @@

</ScrollView>

<ImageButton
android:id="@+id/popupMenuAnchor"
android:layout_width="1dp"
android:layout_height="1dp"
android:visibility="invisible"
android:contentDescription="@string/invisible_popup_menu_anchor"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
6 changes: 3 additions & 3 deletions app/src/main/res/menu/menu_open_note.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
android:id="@+id/saveNoteButton"
android:icon="@android:drawable/ic_menu_save"
android:orderInCategory="4"
android:title="@string/save_note"
android:title="@string/save"
android:visible="false"
app:showAsAction="always" />

<item
android:id="@+id/deleteNoteButton"
android:icon="@android:drawable/ic_menu_delete"
android:orderInCategory="3"
android:title="@string/delete_note"
android:title="@string/delete"
app:showAsAction="ifRoom" />

<item
Expand All @@ -28,6 +28,6 @@
android:id="@+id/changeOpenModeButton"
android:icon="@drawable/ic_visibility"
android:orderInCategory="1"
android:title="@string/change_open_mode"
android:title="@string/change_mode"
app:showAsAction="ifRoom" />
</menu>
6 changes: 4 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
<string name="this_action_cannot_be_undo_are_you_sure">This action cannot be undone.\nAre you sure?</string>
<string name="yes">YES</string>
<string name="no">NO</string>
<string name="delete">DELETE</string>
<string name="delete">Delete</string>
<string name="delete_caps">DELETE</string>
<string name="enter_the_code">Enter the code!</string>
<string name="note">Note</string>
<string name="search">Search</string>
Expand Down Expand Up @@ -106,5 +107,6 @@
<string name="re_encryption_failed_your_key_and_your_data_remains_unchanged">Re-encryption failed, your key and your data remains unchanged.</string>
<string name="view_text">View Text</string>
<string name="view_markdown">Markdown View</string>
<string name="change_open_mode">Change open mode</string>
<string name="change_mode">Change mode</string>
<string name="invisible_popup_menu_anchor">Invisible popup menu anchor</string>
</resources>
Loading