3 Commits

Author SHA1 Message Date
71cf754ac8 activity_setting: fine tune layout style 2025-10-26 20:23:32 +01:00
a200e40816 add signature setting
For multiple users it helps to
keep track about who did what.
2025-10-26 20:23:29 +01:00
2d5a56188d DateUtils: move event details formatting to DateUtils
Also do not display seconds, because it is not
meaningful and is not selected in date picker.
2025-10-26 13:54:17 +01:00
2 changed files with 3 additions and 3 deletions

View File

@@ -12,8 +12,8 @@ android {
applicationId = "it.danieleverducci.lunatracker" applicationId = "it.danieleverducci.lunatracker"
minSdk = 21 minSdk = 21
targetSdk = 34 targetSdk = 34
versionCode = 6 versionCode = 5
versionName = "0.8" versionName = "0.7"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
} }

View File

@@ -114,7 +114,7 @@ class DateUtils {
fun formatDateTime(unixTime: Long): String { fun formatDateTime(unixTime: Long): String {
val date = Date(unixTime * 1000) val date = Date(unixTime * 1000)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
val dateFormat = android.icu.text.DateFormat.getDateTimeInstance(android.icu.text.DateFormat.DEFAULT, android.icu.text.DateFormat.SHORT) val dateFormat = android.icu.text.DateFormat.getDateTimeInstance(android.icu.text.DateFormat.RELATIVE_SHORT, android.icu.text.DateFormat.SHORT)
return dateFormat.format(date) return dateFormat.format(date)
} else { } else {
// fallback // fallback