1 Commits

Author SHA1 Message Date
c5410bee9f notes: add icons to use previous/next event as template 2025-11-07 22:12:49 +01:00
2 changed files with 16 additions and 7 deletions

View File

@@ -299,6 +299,7 @@ class MainActivity : AppCompatActivity() {
val qtyET = dialogView.findViewById<EditText>(R.id.notes_qty_edittext)
val nextTextView = dialogView.findViewById<TextView>(R.id.notes_template_next)
val clearTextView = dialogView.findViewById<TextView>(R.id.notes_clear)
val prevTextView = dialogView.findViewById<TextView>(R.id.notes_template_prev)
fun updateContent(current: LunaEvent) {
@@ -322,12 +323,6 @@ class MainActivity : AppCompatActivity() {
} else {
nextTextView.setOnClickListener {}
nextTextView.alpha = 0.5f
// clear fields
notesET.setText("")
if (useQuantity) {
qtyET.setText("")
}
}
if (prevEvent != null) {
@@ -345,6 +340,14 @@ class MainActivity : AppCompatActivity() {
}
}
clearTextView.setOnClickListener {
notesET.setText("")
if (useQuantity) {
qtyET.setText("")
}
updateContent(lunaEvent)
}
if (!useQuantity) {
qtyET.visibility = View.GONE
}

View File

@@ -37,7 +37,13 @@
android:layout_height="wrap_content"
android:textSize="18dp"
android:text="⬅️"/>
<TextView
android:id="@+id/notes_clear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="5dp"
android:textSize="18dp"
android:text="🚫"/>
<TextView
android:id="@+id/notes_template_next"
android:layout_width="wrap_content"