Skip to content

Commit 4b0b293

Browse files
committed
Add warning label to FindAndReplaceFragment
Inform the user that he could/should do a backup.
1 parent 06eea11 commit 4b0b293

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

AnkiDroid/src/main/res/layout/fragment_find_replace.xml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,29 @@
2222
android:layout_width="match_parent"
2323
android:layout_height="wrap_content"
2424
android:padding="16dp">
25+
26+
<TextView
27+
android:id="@+id/label_warning"
28+
android:layout_width="match_parent"
29+
android:layout_height="wrap_content"
30+
android:drawableStart="@drawable/ic_warning"
31+
android:drawablePadding="4dp"
32+
android:layout_marginHorizontal="8dp"
33+
app:layout_constraintStart_toStartOf="parent"
34+
app:layout_constraintEnd_toEndOf="parent"
35+
android:text="@string/warning_find_and_replace"
36+
android:textStyle="italic"
37+
/>
38+
2539
<TextView
2640
android:id="@+id/label_find"
2741
android:layout_width="match_parent"
2842
android:layout_height="wrap_content"
29-
app:layout_constraintTop_toTopOf="parent"
43+
app:layout_constraintTop_toBottomOf="@id/label_warning"
3044
app:layout_constraintStart_toStartOf="parent"
3145
app:layout_constraintEnd_toEndOf="parent"
3246
android:layout_marginHorizontal="8dp"
47+
android:layout_marginTop="8dp"
3348
tools:text="Find:"/>
3449
<com.google.android.material.textfield.TextInputLayout
3550
android:id="@+id/input_search_layout"

AnkiDroid/src/main/res/values/02-strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@
192192
<string name="tag_editor_add_feedback">Touch “%2$s” to confirm adding “%1$s”</string>
193193
<string name="tag_editor_add_feedback_existing">Existing tag “%1$s” selected</string>
194194
<string name="tag_already_exists">Tag already exists</string>
195+
<string name="warning_find_and_replace">Consider backing up your collection from DeckPicker before using this option!</string>
195196
<!-- Time spans -->
196197

197198
<!-- Currently only used if exporting APKG fails -->

0 commit comments

Comments
 (0)