mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-04-15 15:57:24 +02:00
add a menu button for opening a different note
This commit is contained in:
parent
307e2a4eb1
commit
06e074ae6f
@ -67,6 +67,9 @@ public class MainActivity extends SimpleActivity {
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.open_note:
|
||||
displayOpenNoteDialog();
|
||||
return true;
|
||||
case R.id.share:
|
||||
shareText();
|
||||
return true;
|
||||
@ -111,6 +114,10 @@ public class MainActivity extends SimpleActivity {
|
||||
});
|
||||
}
|
||||
|
||||
private void displayOpenNoteDialog() {
|
||||
|
||||
}
|
||||
|
||||
private void saveText() {
|
||||
final String newText = getCurrentNote();
|
||||
final String oldText = mCurrentNote.getValue();
|
||||
|
@ -1,6 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/open_note"
|
||||
android:icon="@mipmap/open_note"
|
||||
android:title="@string/share"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/share"
|
||||
android:icon="@mipmap/share"
|
||||
|
BIN
app/src/main/res/mipmap-hdpi/open_note.png
Normal file
BIN
app/src/main/res/mipmap-hdpi/open_note.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 271 B |
BIN
app/src/main/res/mipmap-mdpi/open_note.png
Normal file
BIN
app/src/main/res/mipmap-mdpi/open_note.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 201 B |
BIN
app/src/main/res/mipmap-xhdpi/open_note.png
Normal file
BIN
app/src/main/res/mipmap-xhdpi/open_note.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 336 B |
BIN
app/src/main/res/mipmap-xxhdpi/open_note.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/open_note.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 550 B |
BIN
app/src/main/res/mipmap-xxxhdpi/open_note.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/open_note.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 334 B |
@ -13,6 +13,7 @@
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="no_title">Please name your note</string>
|
||||
<string name="title_taken">A note with that title already exists</string>
|
||||
<string name="open_note">Open note</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="settings">Einstellungen</string>
|
||||
|
@ -13,6 +13,7 @@
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="no_title">Please name your note</string>
|
||||
<string name="title_taken">A note with that title already exists</string>
|
||||
<string name="open_note">Open note</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="settings">Impostazioni</string>
|
||||
|
@ -13,6 +13,7 @@
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="no_title">Please name your note</string>
|
||||
<string name="title_taken">A note with that title already exists</string>
|
||||
<string name="open_note">Open note</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="settings">設定</string>
|
||||
|
@ -13,6 +13,7 @@
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="no_title">Please name your note</string>
|
||||
<string name="title_taken">A note with that title already exists</string>
|
||||
<string name="open_note">Open note</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="settings">Inställningar</string>
|
||||
|
@ -13,6 +13,7 @@
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="no_title">Please name your note</string>
|
||||
<string name="title_taken">A note with that title already exists</string>
|
||||
<string name="open_note">Open note</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="settings">Settings</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user