add a menu button for setting yearly view

This commit is contained in:
tibbi 2016-10-17 18:36:53 +02:00
parent 5d246954cc
commit 1866bf1f8f
8 changed files with 19 additions and 0 deletions

View File

@ -43,6 +43,9 @@ class MainActivity : SimpleActivity(), NavigationListener {
override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
R.id.yearly_view -> {
return true
}
R.id.settings -> {
startActivity(Intent(applicationContext, SettingsActivity::class.java))
return true

View File

@ -1,6 +1,10 @@
<?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/yearly_view"
android:title="@string/yearly_view"
app:showAsAction="never"/>
<item
android:id="@+id/settings"
android:title="@string/settings"

View File

@ -4,6 +4,8 @@
<string name="undo">Rückgängig</string>
<string name="ok">OK</string>
<string name="cancel">Abbrechen</string>
<string name="monthly_view">Monthly view</string>
<string name="yearly_view">Yearly view</string>
<!-- Event -->
<string name="event">Termin</string>

View File

@ -4,6 +4,8 @@
<string name="undo">Annulla</string>
<string name="ok">OK</string>
<string name="cancel">Cancel</string>
<string name="monthly_view">Monthly view</string>
<string name="yearly_view">Yearly view</string>
<!-- Event -->
<string name="event">Evento</string>

View File

@ -4,6 +4,8 @@
<string name="undo">元に戻す</string>
<string name="ok">OK</string>
<string name="cancel">Cancel</string>
<string name="monthly_view">Monthly view</string>
<string name="yearly_view">Yearly view</string>
<!-- Event -->
<string name="event">イベント</string>

View File

@ -4,6 +4,8 @@
<string name="undo">Desfazer</string>
<string name="ok">OK</string>
<string name="cancel">Cancelar</string>
<string name="monthly_view">Monthly view</string>
<string name="yearly_view">Yearly view</string>
<!-- Event -->
<string name="event">Evento</string>

View File

@ -4,6 +4,8 @@
<string name="undo">Ångra</string>
<string name="ok">OK</string>
<string name="cancel">Cancel</string>
<string name="monthly_view">Monthly view</string>
<string name="yearly_view">Yearly view</string>
<!-- Event -->
<string name="event">Händelse</string>

View File

@ -4,6 +4,8 @@
<string name="undo">Undo</string>
<string name="ok">OK</string>
<string name="cancel">Cancel</string>
<string name="monthly_view">Monthly view</string>
<string name="yearly_view">Yearly view</string>
<!-- Event -->
<string name="event">Event</string>