diff --git a/android/app/src/main/java/dev/dettmer/simplenotes/NoteEditorActivity.kt b/android/app/src/main/java/dev/dettmer/simplenotes/NoteEditorActivity.kt index 418d9be..c48d7cf 100644 --- a/android/app/src/main/java/dev/dettmer/simplenotes/NoteEditorActivity.kt +++ b/android/app/src/main/java/dev/dettmer/simplenotes/NoteEditorActivity.kt @@ -5,12 +5,13 @@ import android.view.Menu import android.view.MenuItem import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity +import com.google.android.material.appbar.MaterialToolbar +import com.google.android.material.textfield.TextInputEditText import dev.dettmer.simplenotes.models.Note import dev.dettmer.simplenotes.models.SyncStatus import dev.dettmer.simplenotes.storage.NotesStorage import dev.dettmer.simplenotes.utils.DeviceIdGenerator import dev.dettmer.simplenotes.utils.showToast -import com.google.android.material.textfield.TextInputEditText class NoteEditorActivity : AppCompatActivity() { @@ -31,6 +32,8 @@ class NoteEditorActivity : AppCompatActivity() { storage = NotesStorage(this) // Setup toolbar + val toolbar = findViewById(R.id.toolbar) + setSupportActionBar(toolbar) supportActionBar?.apply { setDisplayHomeAsUpEnabled(true) setHomeAsUpIndicator(android.R.drawable.ic_menu_close_clear_cancel) diff --git a/android/app/src/main/java/dev/dettmer/simplenotes/SettingsActivity.kt b/android/app/src/main/java/dev/dettmer/simplenotes/SettingsActivity.kt index 22c50ba..5148b90 100644 --- a/android/app/src/main/java/dev/dettmer/simplenotes/SettingsActivity.kt +++ b/android/app/src/main/java/dev/dettmer/simplenotes/SettingsActivity.kt @@ -8,6 +8,7 @@ import android.widget.EditText import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.widget.SwitchCompat import androidx.lifecycle.lifecycleScope +import com.google.android.material.appbar.MaterialToolbar import dev.dettmer.simplenotes.sync.WebDavSyncService import dev.dettmer.simplenotes.utils.Constants import dev.dettmer.simplenotes.utils.showToast @@ -32,6 +33,9 @@ class SettingsActivity : AppCompatActivity() { super.onCreate(savedInstanceState) setContentView(R.layout.activity_settings) + // Setup toolbar + val toolbar = findViewById(R.id.toolbar) + setSupportActionBar(toolbar) supportActionBar?.apply { setDisplayHomeAsUpEnabled(true) title = "Einstellungen" diff --git a/android/app/src/main/res/layout/activity_settings.xml b/android/app/src/main/res/layout/activity_settings.xml index f33aa87..69783cd 100644 --- a/android/app/src/main/res/layout/activity_settings.xml +++ b/android/app/src/main/res/layout/activity_settings.xml @@ -1,150 +1,165 @@ - + android:layout_height="match_parent" + android:orientation="vertical"> - + android:layout_height="?attr/actionBarSize" + app:title="@string/settings" + app:navigationIcon="?attr/homeAsUpIndicator" /> - - - - - - - - - - - - - - - - - - - - - - - + + android:orientation="vertical" + android:padding="16dp"> + + + + + + + + + -