mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 21:39:50 +02:00
Show a suicide prevention quote when searching suicide.
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
tools:context=".activities.FetchRandomSubredditOrPostActivity">
|
||||
|
||||
<com.airbnb.lottie.LottieAnimationView
|
||||
android:id="@+id/lottie_animation_view_fetch_random_subreddit_or_post_activity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
|
63
app/src/main/res/layout/activity_suicide_prevention.xml
Normal file
63
app/src/main/res/layout/activity_suicide_prevention.xml
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/linear_layout_suicide_prevention_activity"
|
||||
tools:context=".activities.SuicidePreventionActivity">
|
||||
|
||||
<com.airbnb.lottie.LottieAnimationView
|
||||
android:id="@+id/lottie_animation_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_horizontal"
|
||||
app:lottie_autoPlay="true"
|
||||
app:lottie_loop="true"
|
||||
app:lottie_rawRes="@raw/love" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/quote_text_view_suicide_prevention_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:padding="16dp"
|
||||
android:text="@string/suicide_prevention_quote"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_20" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_layout_check_box_wrapper_suicide_prevention_activity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp">
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:id="@+id/do_not_show_this_again_check_box"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/do_not_show_this_again_text_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/do_not_show_this_again"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/continue_button_suicide_prevention_activity"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/continue_suicide_prevention_activity" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
1
app/src/main/res/raw/love.json
Normal file
1
app/src/main/res/raw/love.json
Normal file
File diff suppressed because one or more lines are too long
@@ -543,6 +543,7 @@
|
||||
<string name="settings_show_avatar_on_the_right_in_the_navigation_drawer">Show Avatar on the Left in the Navigation Drawer</string>
|
||||
<string name="settings_backup_settings_title">Backup Settings</string>
|
||||
<string name="settings_restore_settings_title">Restore Settings</string>
|
||||
<string name="settings_credits_love_animation_title">Love Animation</string>
|
||||
|
||||
<string name="no_link_available">Cannot get the link</string>
|
||||
|
||||
@@ -1047,4 +1048,8 @@
|
||||
<string name="restore_settings_failed_file_corrupted">Cannot restore settings. The file may be corrupted.</string>
|
||||
<string name="restore_settings_failed_cannot_get_file">Cannot access the file</string>
|
||||
|
||||
<string name="suicide_prevention_quote">If you are looking for a sign not to kill yourself, this is it.\u2764</string>
|
||||
<string name="do_not_show_this_again">Do not show this again</string>
|
||||
<string name="continue_suicide_prevention_activity">Continue</string>
|
||||
|
||||
</resources>
|
||||
|
@@ -51,4 +51,9 @@
|
||||
app:title="@string/settings_credits_ufo_capturing_animation_title"
|
||||
android:summary="https://lottiefiles.com/33858-ufo-capturing-animation" />
|
||||
|
||||
<Preference
|
||||
app:key="love_animation"
|
||||
app:title="@string/settings_credits_love_animation_title"
|
||||
android:summary="https://lottiefiles.com/52103-love" />
|
||||
|
||||
</PreferenceScreen>
|
||||
|
Reference in New Issue
Block a user