Skip to content

Commit

Permalink
enh: Add seizure warning to interval dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
cyb3rko committed Dec 27, 2023
1 parent e69b1a5 commit 0a9584d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ internal object IntervalDialog {
it.disable()
binding.flashButton.enable()
}
binding.seizureWarning.text = context.getText(R.string.dialog_interval_seizure_warning)

val dialog = MaterialAlertDialogBuilder(
context,
Expand Down
13 changes: 11 additions & 2 deletions app/src/main/res/layout/dialog_interval.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,21 @@
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingBottom="32dp"
android:paddingTop="8dp">
android:paddingTop="8dp"
tools:layout_width="300dp">

<TextView
android:id="@+id/seizure_warning"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:layout_marginTop="5dp"
tools:text="⚠️ Seizure Warning: Flashing light" />

<com.google.android.material.button.MaterialButtonToggleGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginTop="20dp"
app:checkedButton="@id/time_button"
app:selectionRequired="true"
app:singleSelection="true">
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<string name="dialog_morse_error_characters">Use characters a–z, A–Z, 0–9 and space</string>
<string name="dialog_morse_button">Flash</string>
<string name="dialog_interval_title">Interval Flash</string>
<string name="dialog_interval_seizure_warning">⚠️ <b>Seizure Warning</b>: Flashing light</string>
<string name="dialog_interval_input_hint1">Interval time (200–10000ms)</string>
<string name="dialog_interval_input_hint2">Beats per minute (10–200)</string>
<string name="dialog_interval_error">Value not allowed</string>
Expand Down

0 comments on commit 0a9584d

Please sign in to comment.