Correct dismiss listener

This commit is contained in:
clement
2024-07-09 17:57:01 +02:00
parent a744faf0d2
commit 26c6061a8f

View File

@@ -29,7 +29,6 @@ class ValidateMarker: AppCompatActivity() {
companion object{ companion object{
const val MARKERS = "MARKERS" const val MARKERS = "MARKERS"
} }
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
val geocoder = Geocoder(this, Locale.getDefault()) val geocoder = Geocoder(this, Locale.getDefault())
@@ -74,12 +73,12 @@ class ValidateMarker: AppCompatActivity() {
} }
val newRowId = db?.insert(StopContract.StopEntry.TABLE_NAME, null, values) val newRowId = db?.insert(StopContract.StopEntry.TABLE_NAME, null, values)
} }
val alert = AlertDialog.Builder(this).setTitle("Route sauvegardée").setMessage("Le trajet à été créer !") val alert = AlertDialog.Builder(this).setTitle("Route sauvegardée")
alert.show() .setMessage("Le trajet à été créer !").setOnDismissListener{
alert.setOnDismissListener{
db.close() db.close()
finish() finish()
} }
alert.show()
} }
} }