mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-02-20 21:30:59 +01: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>
|
||||
@ -35,7 +36,7 @@
|
||||
<string name="follow_us">Folge uns:</string>
|
||||
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
|
||||
|
||||
<!--License-->
|
||||
<!-- License -->
|
||||
<string name="notice">Diese App nutzt die folgenden Drittanbieterbibliotheken, die mein Leben einfacher machen. Danke.</string>
|
||||
<string name="third_party_licences">Drittanbieterlizenzen</string>
|
||||
<string name="butterknife_title"><u>Butter Knife (view injector)</u></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>
|
||||
@ -35,7 +36,7 @@
|
||||
<string name="follow_us">Seguici:</string>
|
||||
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
|
||||
|
||||
<!--License-->
|
||||
<!-- License -->
|
||||
<string name="notice">Questa app usa le seguenti librerie di terze parti per semplificarmi la vita. Grazie.</string>
|
||||
<string name="third_party_licences">Licenze di terze parti</string>
|
||||
<string name="butterknife_title"><u>Butter Knife (view injector)</u></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>
|
||||
@ -35,7 +36,7 @@
|
||||
<string name="follow_us">フォローしてください:</string>
|
||||
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
|
||||
|
||||
<!--License-->
|
||||
<!-- License -->
|
||||
<string name="notice">このアプリは、私の人生を容易にするために、次のサードパーティのライブラリーを使用しています。 ありがとうございます。</string>
|
||||
<string name="third_party_licences">サードパーティー ライセンス</string>
|
||||
<string name="butterknife_title"><u>Butter Knife (ビュー インジェクター)</u></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>
|
||||
@ -35,7 +36,7 @@
|
||||
<string name="follow_us">Följ oss:</string>
|
||||
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
|
||||
|
||||
<!--License-->
|
||||
<!-- License -->
|
||||
<string name="notice">Denna app använder följande tredjepartsbibliotek för att göra mitt liv enklare. Tack.</string>
|
||||
<string name="third_party_licences">Tredjepartslicenser</string>
|
||||
<string name="butterknife_title"><u>Butter Knife (view injector)</u></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>
|
||||
@ -36,7 +37,7 @@
|
||||
<string name="follow_us">Follow us:</string>
|
||||
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
|
||||
|
||||
<!--License-->
|
||||
<!-- License -->
|
||||
<string name="notice">This app uses the following third party libraries to make my life easier. Thank you.</string>
|
||||
<string name="third_party_licences">Third party licences</string>
|
||||
<string name="butterknife_title"><u>Butter Knife (view injector)</u></string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user