Compare commits
3 Commits
master
...
a90f939428
| Author | SHA1 | Date | |
|---|---|---|---|
| a90f939428 | |||
| 28674e2acc | |||
| 2d5a56188d |
@@ -12,8 +12,8 @@ android {
|
|||||||
applicationId = "it.danieleverducci.lunatracker"
|
applicationId = "it.danieleverducci.lunatracker"
|
||||||
minSdk = 21
|
minSdk = 21
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionCode = 7
|
versionCode = 5
|
||||||
versionName = "0.9"
|
versionName = "0.7"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
@@ -60,4 +60,4 @@ dependencies {
|
|||||||
androidTestImplementation(libs.androidx.ui.test.junit4)
|
androidTestImplementation(libs.androidx.ui.test.junit4)
|
||||||
debugImplementation(libs.androidx.ui.tooling)
|
debugImplementation(libs.androidx.ui.tooling)
|
||||||
debugImplementation(libs.androidx.ui.test.manifest)
|
debugImplementation(libs.androidx.ui.test.manifest)
|
||||||
}
|
}
|
||||||
@@ -275,7 +275,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
d.setPositiveButton(android.R.string.ok) { dialogInterface, i ->
|
d.setPositiveButton(android.R.string.ok) { dialogInterface, i ->
|
||||||
val pos = spinner.selectedItemPosition
|
val pos = spinner.selectedItemPosition
|
||||||
logEvent(LunaEvent(LunaEvent.TYPE_PUKE, pos + 1))
|
logEvent(LunaEvent(LunaEvent.TYPE_PUKE, pos))
|
||||||
}
|
}
|
||||||
d.setNegativeButton(android.R.string.cancel) { dialogInterface, i -> dialogInterface.dismiss() }
|
d.setNegativeButton(android.R.string.cancel) { dialogInterface, i -> dialogInterface.dismiss() }
|
||||||
val alertDialog = d.create()
|
val alertDialog = d.create()
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class NumericUtils (val context: Context) {
|
|||||||
LunaEvent.TYPE_TEMPERATURE ->
|
LunaEvent.TYPE_TEMPERATURE ->
|
||||||
(item.quantity / 10.0f).toString()
|
(item.quantity / 10.0f).toString()
|
||||||
LunaEvent.TYPE_PUKE ->
|
LunaEvent.TYPE_PUKE ->
|
||||||
context.resources.getStringArray(R.array.AmountLabels)[item.quantity - 1]
|
context.resources.getStringArray(R.array.AmountLabels)[item.quantity]
|
||||||
else ->
|
else ->
|
||||||
item.quantity
|
item.quantity
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,9 +4,7 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingTop="20dp"
|
android:padding="20dp">
|
||||||
android:paddingBottom="10dp"
|
|
||||||
android:paddingHorizontal="20dp">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/dialog_event_detail_type_emoji"
|
android:id="@+id/dialog_event_detail_type_emoji"
|
||||||
|
|||||||
Reference in New Issue
Block a user