aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/res
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2019-01-04 17:18:34 +0100
committerChristian Schneppe <christian@pix-art.de>2019-01-04 17:18:34 +0100
commit7685c46c5af7154c6fb59ab020a174923643bd48 (patch)
treed14edb2d89e3139ca58080c6013cc1ae3ccf24a7 /src/main/res
parent032630143a286f886c58f802d3c61c9a4ba3e99f (diff)
add preference to play gif files automatically in chat view
fixes #170 and #236
Diffstat (limited to '')
-rw-r--r--src/main/res/layout/message_content.xml13
-rw-r--r--src/main/res/values/defaults.xml1
-rw-r--r--src/main/res/values/strings.xml2
-rw-r--r--src/main/res/xml/preferences.xml5
4 files changed, 21 insertions, 0 deletions
diff --git a/src/main/res/layout/message_content.xml b/src/main/res/layout/message_content.xml
index 67c993cac..f14f310c3 100644
--- a/src/main/res/layout/message_content.xml
+++ b/src/main/res/layout/message_content.xml
@@ -15,6 +15,19 @@
android:scaleType="centerCrop"
app:riv_corner_radius="@dimen/rounded_image_border" />
+ <pl.droidsonroids.gif.GifImageView
+ android:id="@+id/message_image_gif"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="2dp"
+ android:layout_marginBottom="4dp"
+ android:adjustViewBounds="true"
+ android:longClickable="true"
+ android:maxWidth="500dp"
+ android:maxHeight="500dp"
+ android:scaleType="centerCrop"
+ app:riv_corner_radius="@dimen/rounded_image_border" />
+
<de.pixart.messenger.ui.widget.CopyTextView
android:id="@+id/message_body"
android:layout_width="wrap_content"
diff --git a/src/main/res/values/defaults.xml b/src/main/res/values/defaults.xml
index a9edc5a92..116081eb0 100644
--- a/src/main/res/values/defaults.xml
+++ b/src/main/res/values/defaults.xml
@@ -110,6 +110,7 @@
<bool name="show_record_voice_btn">true</bool>
<bool name="quick_share_attachment_choice">true</bool>
<bool name="screen_security">false</bool>
+ <bool name="play_gif_inside">false</bool>
<string-array name="domains">
<item>pix-art.de</item>
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 5d0160b7a..e80438379 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -857,4 +857,6 @@
<string name="enter_your_name_instructions">Please enter your nickname which will be visible to your contacts.</string>
<string name="no_name_set_instructions">No nickname set.</string>
<string name="autojoin_groupchat">Automatically join this group chat</string>
+ <string name="pref_play_gif_inside">Play GIF files in chat</string>
+ <string name="pref_play_gif_inside_summary">Setting this to true plays GIF files directly inside the chat view.</string>
</resources>
diff --git a/src/main/res/xml/preferences.xml b/src/main/res/xml/preferences.xml
index e5ccfa8e4..747338435 100644
--- a/src/main/res/xml/preferences.xml
+++ b/src/main/res/xml/preferences.xml
@@ -71,6 +71,11 @@
android:key="scroll_to_bottom"
android:summary="@string/pref_scroll_to_bottom_summary"
android:title="@string/pref_scroll_to_bottom" />
+ <CheckBoxPreference
+ android:defaultValue="@bool/play_gif_inside"
+ android:key="play_gif_inside"
+ android:summary="@string/pref_play_gif_inside_summary"
+ android:title="@string/pref_play_gif_inside" />
</PreferenceScreen>
<!--Notifications-->
<PreferenceScreen