Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

Commit 6d6a314

Browse files
author
FerranAD
committed
feat(add-note): implement complete form
1 parent 3a2e2d4 commit 6d6a314

4 files changed

Lines changed: 247 additions & 79 deletions

File tree

app/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ android {
3131
}
3232

3333
compileOptions {
34+
coreLibraryDesugaringEnabled true
3435
sourceCompatibility JavaVersion.VERSION_1_8
3536
targetCompatibility JavaVersion.VERSION_1_8
3637
}
@@ -66,6 +67,7 @@ dependencies {
6667
implementation platform('androidx.compose:compose-bom:2022.10.00')
6768
implementation 'androidx.compose.ui:ui-graphics'
6869
implementation platform('androidx.compose:compose-bom:2022.10.00')
70+
implementation 'com.google.android.material:material:1.5.0'
6971
testImplementation 'junit:junit:4.13.2'
7072
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
7173
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
@@ -88,4 +90,8 @@ dependencies {
8890
// GIFs
8991
implementation "io.coil-kt:coil-compose:2.1.0"
9092
implementation "io.coil-kt:coil-gif:2.1.0"
93+
94+
// Date picker
95+
implementation "io.github.vanpra.compose-material-dialogs:datetime:0.8.1-rc"
96+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
9197
}

app/src/main/java/com/eps/todoturtle/nfc/WriteToDeviceActivity.kt

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ class WriteToDeviceActivity : ComponentActivity() {
2626
modifier = Modifier.fillMaxSize(),
2727
color = MaterialTheme.colorScheme.background,
2828
) {
29-
WriteDevice(viewModel = viewModel,
29+
WriteDevice(
30+
viewModel = viewModel,
3031
onTagNotWriteable = ::restartActivity,
3132
onTagLost = ::restartActivity,
3233
unknownError = ::restartActivity,
@@ -38,17 +39,19 @@ class WriteToDeviceActivity : ComponentActivity() {
3839
Toast.makeText(this, getString(R.string.nfc_write_success), Toast.LENGTH_SHORT)
3940
.show()
4041
finish()
41-
})
42+
},
43+
)
4244
}
4345
}
4446
}
4547
}
4648

4749
private fun restartActivity() {
4850
finish()
49-
startActivity(intent.apply {
50-
addFlags(FLAG_ACTIVITY_NO_ANIMATION)
51-
})
51+
startActivity(
52+
intent.apply {
53+
addFlags(FLAG_ACTIVITY_NO_ANIMATION)
54+
},
55+
)
5256
}
5357
}
54-

0 commit comments

Comments
 (0)