Started big previews

This commit is contained in:
Sylvain Berfini 2018-11-28 11:43:46 +01:00
parent 78c085e630
commit 0afb297a63
3 changed files with 16 additions and 2 deletions

View file

@ -222,8 +222,13 @@ public class ChatMessageViewHolder extends RecyclerView.ViewHolder implements Vi
View v;
if (FileUtils.isExtensionImage(filePath)) {
v = content.findViewById(R.id.image);
loadBitmap(c.getFilePath(), ((ImageView)v));
if (fileContents.size() == 1 && mContext.getResources().getBoolean(R.bool.use_big_pictures_to_preview_images_file_transfers)) {
v = content.findViewById(R.id.bigImage);
loadBitmap(c.getFilePath(), ((ImageView) v));
} else {
v = content.findViewById(R.id.image);
loadBitmap(c.getFilePath(), ((ImageView) v));
}
} else {
v = content.findViewById(R.id.file);
((TextView)v).setText(FileUtils.getNameFromFilePath(filePath));

View file

@ -11,6 +11,14 @@
android:layout_height="100dp"
android:layout_margin="5dp"/>
<ImageView
android:id="@+id/bigImage"
android:visibility="gone"
android:adjustViewBounds="true"
android:layout_width="wrap_content"
android:layout_height="300dp"
android:layout_margin="5dp"/>
<TextView
android:id="@+id/file"
android:visibility="gone"

View file

@ -91,6 +91,7 @@
<bool name="allow_multiple_images_and_text">true</bool>
<bool name="send_text_and_images_as_different_messages">true</bool>
<bool name="use_new_chat_bubbles_layout">true</bool>
<bool name="use_big_pictures_to_preview_images_file_transfers">true</bool>
<!-- Contacts -->
<bool name="hide_contact_phone_numbers">false</bool>