- Added comprehensive English (strings.xml) and German (strings-de.xml) localization with 400+ strings - Created new LanguageSettingsScreen with System Default, English, and German options - Fixed hardcoded German notification toasts in MainActivity and ComposeMainActivity - Integrated Language selector in Settings as top-level menu item - Changed ComposeSettingsActivity from ComponentActivity to AppCompatActivity for AppCompatDelegate compatibility - Added locales_config.xml for Android 13+ Per-App Language support - Updated Extensions.kt with i18n-aware timestamp formatting (toReadableTime with context) - Translated all UI strings including settings, toasts, notifications, and error messages - Added dynamic language display in SettingsMainScreen showing current language Fixes: - Notification permission toast now respects system language setting - Activity correctly restarts when language is changed - All string formatting with parameters properly localized Migration: - MainViewModel: All toast messages now use getString() - SettingsViewModel: All toast and dialog messages localized - NotificationHelper: Notification titles and messages translated - UrlValidator: Error messages now accept Context parameter for translation - NoteCard, DeleteConfirmationDialog, SyncStatusBanner: All strings externalized Testing completed on device with both EN and DE locale switching. Closes #5
Simple Notes - Android App
🚧 Development Setup
Voraussetzungen
- Android Studio Hedgehog (2023.1.1) oder neuer
- JDK 17
- Android SDK 34
- Min SDK 24
Projekt in Android Studio öffnen
# In Android Studio:
# File → New → New Project
# Template: Empty Views Activity
#
# Settings:
# Name: Simple Notes
# Package: com.example.simplenotes
# Save location: /home/liq/gitProjects/simple-notes-sync/android/
# Language: Kotlin
# Minimum SDK: API 24
# Build configuration: Kotlin DSL
Dependencies
Siehe ANDROID_GUIDE.md in project-docs für vollständige build.gradle.kts:
Hauptabhängigkeiten:
- Sardine Android (WebDAV Client)
- Kotlin Coroutines
- Gson (JSON)
- WorkManager (Background Sync)
- Material Design Components
Projektstruktur
android/
└── app/
└── src/
└── main/
├── AndroidManifest.xml
├── java/com/example/simplenotes/
│ ├── MainActivity.kt
│ ├── NoteEditorActivity.kt
│ ├── SettingsActivity.kt
│ ├── models/
│ │ ├── Note.kt
│ │ └── SyncStatus.kt
│ ├── storage/
│ │ └── NotesStorage.kt
│ ├── sync/
│ │ ├── WebDavSyncService.kt
│ │ ├── WifiSyncReceiver.kt
│ │ ├── SyncWorker.kt
│ │ └── ConflictResolver.kt
│ ├── adapters/
│ │ └── NotesAdapter.kt
│ └── utils/
│ ├── DeviceIdGenerator.kt
│ ├── NotificationHelper.kt
│ ├── Extensions.kt
│ └── Constants.kt
└── res/
├── layout/
├── values/
└── drawable/
📖 Development Guide
Vollständige Code-Beispiele und Implementation:
🏗️ Build
# Debug Build
./gradlew assembleDebug
# Release Build
./gradlew assembleRelease
# Install on connected device
./gradlew installDebug
🧪 Testing
# Run unit tests
./gradlew test
# Run instrumented tests
./gradlew connectedAndroidTest
📝 TODO
- Projekt in Android Studio erstellen
- Dependencies einrichten
- Models implementieren (Note.kt, SyncStatus.kt)
- Storage Layer (NotesStorage.kt)
- UI Layouts erstellen
- Activities implementieren
- Sync Service (WebDavSyncService.kt)
- WLAN Detection (WifiSyncReceiver.kt)
- WorkManager Setup (SyncWorker.kt)
- Notifications (NotificationHelper.kt)
- Error Handling
- Testing
Next Step: Projekt in Android Studio erstellen und Code aus ANDROID_GUIDE.md übernehmen.