Reset aller Techniker ermöglicht

master
Niko Diamadis 5 years ago
parent a5444209fd
commit 56f0f4baf3

@ -121,6 +121,19 @@ class ProjectActivity : AppCompatActivity() {
}
emptyCheck()
if (adminMode) {
reset_button.visibility = View.VISIBLE
reset_button.setOnClickListener {
MaterialDialog(this).show {
message(text = "Möchtest du alle eingetragenen Techniker entfernen?")
positiveButton(text = "Ja") {
databaseReference.child("techniker").removeValue()
}
negativeButton(text = "Abbrechen")
}
}
}
}
private fun technikerExists(name: String): Boolean {

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@ -145,6 +145,18 @@
android:layout_gravity="center_vertical"
android:gravity="end">
<ImageButton
android:id="@+id/reset_button"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="45dp"
android:layout_height="40dp"
android:layout_gravity="end"
android:contentDescription="Add Icon"
android:scaleType="fitEnd"
android:visibility="gone"
android:src="@drawable/_icon_delete"
tools:visibility="visible"/>
<ImageButton
android:id="@+id/add_button"
style="@style/Widget.AppCompat.Button.Borderless"

Loading…
Cancel
Save