add a menu item for changing widgets note

This commit is contained in:
tibbi 2016-10-24 21:03:57 +02:00
parent b2c37d85e2
commit 730f1393f1
8 changed files with 20 additions and 0 deletions

View File

@ -74,6 +74,9 @@ public class MainActivity extends SimpleActivity {
final MenuItem deleteNote = menu.findItem(R.id.delete_note);
deleteNote.setVisible(mNotes.size() > 1);
final MenuItem changeNote = menu.findItem(R.id.change_widget_note);
changeNote.setVisible(mNotes.size() > 1);
return true;
}
@ -89,6 +92,9 @@ public class MainActivity extends SimpleActivity {
case R.id.share:
shareText();
return true;
case R.id.change_widget_note:
showWidgetNotePicker();
return true;
case R.id.settings:
startActivity(new Intent(getApplicationContext(), SettingsActivity.class));
return true;
@ -100,6 +106,10 @@ public class MainActivity extends SimpleActivity {
}
}
private void showWidgetNotePicker() {
}
private void updateSelectedNote(int index) {
saveText();
mConfig.setCurrentNoteIndex(index);

View File

@ -15,6 +15,10 @@
android:icon="@mipmap/share"
android:title="@string/share"
app:showAsAction="ifRoom"/>
<item
android:id="@+id/change_widget_note"
android:title="@string/change_widget_note"
app:showAsAction="never"/>
<item
android:id="@+id/settings"
android:title="@string/settings"

View File

@ -19,6 +19,7 @@
<string name="delete_note_prompt_message">Bist du sicher, dass du Notiz \"%1$s\" löschen willst?</string>
<string name="pick_a_note">Notiz auswählen</string>
<string name="current_note">Aktuelle Notiz:</string>
<string name="change_widget_note">Change widget\'s note</string>
<!-- Settings -->
<string name="settings">Einstellungen</string>

View File

@ -19,6 +19,7 @@
<string name="delete_note_prompt_message">Are you sure you want to delete note \"%1$s\"?</string>
<string name="pick_a_note">Pick a note</string>
<string name="current_note">Current note:</string>
<string name="change_widget_note">Change widget\'s note</string>
<!-- Settings -->
<string name="settings">Impostazioni</string>

View File

@ -19,6 +19,7 @@
<string name="delete_note_prompt_message">Are you sure you want to delete note \"%1$s\"?</string>
<string name="pick_a_note">Pick a note</string>
<string name="current_note">Current note:</string>
<string name="change_widget_note">Change widget\'s note</string>
<!-- Settings -->
<string name="settings">設定</string>

View File

@ -19,6 +19,7 @@
<string name="delete_note_prompt_message">Pretende mesmo eliminar a nota \"%1$s\"?</string>
<string name="pick_a_note">Selecione uma nota</string>
<string name="current_note">Nota atual:</string>
<string name="change_widget_note">Change widget\'s note</string>
<!-- Settings -->
<string name="settings">Definições</string>

View File

@ -19,6 +19,7 @@
<string name="delete_note_prompt_message">Are you sure you want to delete note \"%1$s\"?</string>
<string name="pick_a_note">Pick a note</string>
<string name="current_note">Current note:</string>
<string name="change_widget_note">Change widget\'s note</string>
<!-- Settings -->
<string name="settings">Inställningar</string>

View File

@ -19,6 +19,7 @@
<string name="delete_note_prompt_message">Are you sure you want to delete note \"%1$s\"?</string>
<string name="pick_a_note">Pick a note</string>
<string name="current_note">Current note:</string>
<string name="change_widget_note">Change widget\'s note</string>
<!-- Settings -->
<string name="settings">Settings</string>