Align quote behaviour, move the media message outside of text bubble to simplify layouts (#935)
* refactor: remove text from quote model * refactor: add docs for TODOs where quote text should be refactored * refactor: remove the references to stored text in the quote and get the quote text from referenced DB lookup * refactor: drop the quote data from DB * fix: turns out we can't drop columns using this version of sqlite * fix: fixing an attachment download bug, fixing up UI issues with quotes and body text * feat: split off the message attachment UI from message bubble * refactor: replace media thumbnails with new designs * refactor: add debug drawing to troubleshoot swipe gesture * fix: fix the swipe to reply gesture drawingpull/944/head
parent
b1e954084c
commit
d53752713e
@ -1,153 +0,0 @@
|
|||||||
package org.thoughtcrime.securesms.components;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.util.AttributeSet;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.FrameLayout;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import androidx.annotation.ColorInt;
|
|
||||||
import androidx.annotation.IdRes;
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
|
|
||||||
import org.session.libsession.utilities.Stub;
|
|
||||||
import org.thoughtcrime.securesms.conversation.v2.utilities.KThumbnailView;
|
|
||||||
import org.thoughtcrime.securesms.mms.GlideRequests;
|
|
||||||
import org.thoughtcrime.securesms.mms.Slide;
|
|
||||||
import org.thoughtcrime.securesms.mms.SlideClickListener;
|
|
||||||
import org.thoughtcrime.securesms.mms.SlidesClickedListener;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import network.loki.messenger.R;
|
|
||||||
|
|
||||||
public class AlbumThumbnailView extends FrameLayout {
|
|
||||||
|
|
||||||
private @Nullable SlideClickListener thumbnailClickListener;
|
|
||||||
private @Nullable SlidesClickedListener downloadClickListener;
|
|
||||||
|
|
||||||
private int currentSizeClass;
|
|
||||||
|
|
||||||
private ViewGroup albumCellContainer;
|
|
||||||
private Stub<TransferControlView> transferControls;
|
|
||||||
|
|
||||||
private final SlideClickListener defaultThumbnailClickListener = (v, slide) -> {
|
|
||||||
if (thumbnailClickListener != null) {
|
|
||||||
thumbnailClickListener.onClick(v, slide);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private final OnLongClickListener defaultLongClickListener = v -> this.performLongClick();
|
|
||||||
|
|
||||||
public AlbumThumbnailView(@NonNull Context context) {
|
|
||||||
super(context);
|
|
||||||
initialize();
|
|
||||||
}
|
|
||||||
|
|
||||||
public AlbumThumbnailView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
|
||||||
super(context, attrs);
|
|
||||||
initialize();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initialize() {
|
|
||||||
inflate(getContext(), R.layout.album_thumbnail_view, this);
|
|
||||||
|
|
||||||
albumCellContainer = findViewById(R.id.albumCellContainer);
|
|
||||||
transferControls = new Stub<>(findViewById(R.id.albumTransferControlsStub));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSlides(@NonNull GlideRequests glideRequests, @NonNull List<Slide> slides, boolean showControls) {
|
|
||||||
if (slides.size() < 2) {
|
|
||||||
throw new IllegalStateException("Provided less than two slides.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (showControls) {
|
|
||||||
transferControls.get().setShowDownloadText(true);
|
|
||||||
transferControls.get().setSlides(slides);
|
|
||||||
transferControls.get().setDownloadClickListener(v -> {
|
|
||||||
if (downloadClickListener != null) {
|
|
||||||
downloadClickListener.onClick(v, slides);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
if (transferControls.resolved()) {
|
|
||||||
transferControls.get().setVisibility(GONE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int sizeClass = Math.min(slides.size(), 6);
|
|
||||||
|
|
||||||
if (sizeClass != currentSizeClass) {
|
|
||||||
inflateLayout(sizeClass);
|
|
||||||
currentSizeClass = sizeClass;
|
|
||||||
}
|
|
||||||
|
|
||||||
showSlides(glideRequests, slides);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCellBackgroundColor(@ColorInt int color) {
|
|
||||||
ViewGroup cellRoot = findViewById(R.id.album_thumbnail_root);
|
|
||||||
|
|
||||||
if (cellRoot != null) {
|
|
||||||
for (int i = 0; i < cellRoot.getChildCount(); i++) {
|
|
||||||
cellRoot.getChildAt(i).setBackgroundColor(color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setThumbnailClickListener(@Nullable SlideClickListener listener) {
|
|
||||||
thumbnailClickListener = listener;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDownloadClickListener(@Nullable SlidesClickedListener listener) {
|
|
||||||
downloadClickListener = listener;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void inflateLayout(int sizeClass) {
|
|
||||||
albumCellContainer.removeAllViews();
|
|
||||||
|
|
||||||
switch (sizeClass) {
|
|
||||||
case 2:
|
|
||||||
inflate(getContext(), R.layout.album_thumbnail_2, albumCellContainer);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
inflate(getContext(), R.layout.album_thumbnail_3, albumCellContainer);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
inflate(getContext(), R.layout.album_thumbnail_4, albumCellContainer);
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
inflate(getContext(), R.layout.album_thumbnail_5, albumCellContainer);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
inflate(getContext(), R.layout.album_thumbnail_many, albumCellContainer);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void showSlides(@NonNull GlideRequests glideRequests, @NonNull List<Slide> slides) {
|
|
||||||
setSlide(glideRequests, slides.get(0), R.id.album_cell_1);
|
|
||||||
setSlide(glideRequests, slides.get(1), R.id.album_cell_2);
|
|
||||||
|
|
||||||
if (slides.size() >= 3) {
|
|
||||||
setSlide(glideRequests, slides.get(2), R.id.album_cell_3);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (slides.size() >= 4) {
|
|
||||||
setSlide(glideRequests, slides.get(3), R.id.album_cell_4);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (slides.size() >= 5) {
|
|
||||||
setSlide(glideRequests, slides.get(4), R.id.album_cell_5);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (slides.size() > 5) {
|
|
||||||
TextView text = findViewById(R.id.album_cell_overflow_text);
|
|
||||||
text.setText(getContext().getString(R.string.AlbumThumbnailView_plus, slides.size() - 5));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setSlide(@NonNull GlideRequests glideRequests, @NonNull Slide slide, @IdRes int id) {
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,158 +0,0 @@
|
|||||||
package org.thoughtcrime.securesms.components;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.res.TypedArray;
|
|
||||||
import android.graphics.Canvas;
|
|
||||||
import android.util.AttributeSet;
|
|
||||||
import android.widget.FrameLayout;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
|
|
||||||
import androidx.annotation.ColorInt;
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.annotation.UiThread;
|
|
||||||
|
|
||||||
import org.thoughtcrime.securesms.conversation.v2.utilities.ThumbnailView;
|
|
||||||
import org.thoughtcrime.securesms.mms.GlideRequests;
|
|
||||||
|
|
||||||
import org.thoughtcrime.securesms.mms.Slide;
|
|
||||||
import org.thoughtcrime.securesms.mms.SlideClickListener;
|
|
||||||
import org.thoughtcrime.securesms.mms.SlidesClickedListener;
|
|
||||||
|
|
||||||
import org.session.libsession.messaging.sending_receiving.attachments.Attachment;
|
|
||||||
import org.session.libsession.utilities.ThemeUtil;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import network.loki.messenger.R;
|
|
||||||
|
|
||||||
public class ConversationItemThumbnail extends FrameLayout {
|
|
||||||
|
|
||||||
private ThumbnailView thumbnail;
|
|
||||||
private AlbumThumbnailView album;
|
|
||||||
private ImageView shade;
|
|
||||||
private ConversationItemFooter footer;
|
|
||||||
private CornerMask cornerMask;
|
|
||||||
private Outliner outliner;
|
|
||||||
private boolean borderless;
|
|
||||||
|
|
||||||
public ConversationItemThumbnail(Context context) {
|
|
||||||
super(context);
|
|
||||||
init(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ConversationItemThumbnail(Context context, AttributeSet attrs) {
|
|
||||||
super(context, attrs);
|
|
||||||
init(attrs);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ConversationItemThumbnail(final Context context, AttributeSet attrs, int defStyle) {
|
|
||||||
super(context, attrs, defStyle);
|
|
||||||
init(attrs);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void init(@Nullable AttributeSet attrs) {
|
|
||||||
inflate(getContext(), R.layout.conversation_item_thumbnail, this);
|
|
||||||
|
|
||||||
this.thumbnail = findViewById(R.id.conversation_thumbnail_image);
|
|
||||||
this.album = findViewById(R.id.conversation_thumbnail_album);
|
|
||||||
this.shade = findViewById(R.id.conversation_thumbnail_shade);
|
|
||||||
this.footer = findViewById(R.id.conversation_thumbnail_footer);
|
|
||||||
this.cornerMask = new CornerMask(this);
|
|
||||||
this.outliner = new Outliner();
|
|
||||||
|
|
||||||
outliner.setColor(ThemeUtil.getThemedColor(getContext(), R.attr.conversation_item_image_outline_color));
|
|
||||||
|
|
||||||
if (attrs != null) {
|
|
||||||
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(attrs, R.styleable.ConversationItemThumbnail, 0, 0);
|
|
||||||
typedArray.recycle();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void dispatchDraw(Canvas canvas) {
|
|
||||||
super.dispatchDraw(canvas);
|
|
||||||
|
|
||||||
if (!borderless) {
|
|
||||||
cornerMask.mask(canvas);
|
|
||||||
|
|
||||||
if (album.getVisibility() != VISIBLE) {
|
|
||||||
outliner.draw(canvas);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setFocusable(boolean focusable) {
|
|
||||||
thumbnail.setFocusable(focusable);
|
|
||||||
album.setFocusable(focusable);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setClickable(boolean clickable) {
|
|
||||||
thumbnail.setClickable(clickable);
|
|
||||||
album.setClickable(clickable);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setOnLongClickListener(@Nullable OnLongClickListener l) {
|
|
||||||
thumbnail.setOnLongClickListener(l);
|
|
||||||
album.setOnLongClickListener(l);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void showShade(boolean show) {
|
|
||||||
shade.setVisibility(show ? VISIBLE : GONE);
|
|
||||||
forceLayout();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCorners(int topLeft, int topRight, int bottomRight, int bottomLeft) {
|
|
||||||
cornerMask.setRadii(topLeft, topRight, bottomRight, bottomLeft);
|
|
||||||
outliner.setRadii(topLeft, topRight, bottomRight, bottomLeft);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBorderless(boolean borderless) {
|
|
||||||
this.borderless = borderless;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ConversationItemFooter getFooter() {
|
|
||||||
return footer;
|
|
||||||
}
|
|
||||||
|
|
||||||
@UiThread
|
|
||||||
public void setImageResource(@NonNull GlideRequests glideRequests, @NonNull List<Slide> slides,
|
|
||||||
boolean showControls, boolean isPreview)
|
|
||||||
{
|
|
||||||
if (slides.size() == 1) {
|
|
||||||
thumbnail.setVisibility(VISIBLE);
|
|
||||||
album.setVisibility(GONE);
|
|
||||||
|
|
||||||
Slide slide = slides.get(0);
|
|
||||||
Attachment attachment = slide.asAttachment();
|
|
||||||
thumbnail.setImageResource(glideRequests, slide, showControls, isPreview, attachment.getWidth(), attachment.getHeight());
|
|
||||||
thumbnail.setLoadIndicatorVisibile(slide.isInProgress());
|
|
||||||
setTouchDelegate(thumbnail.getTouchDelegate());
|
|
||||||
} else {
|
|
||||||
thumbnail.setVisibility(GONE);
|
|
||||||
album.setVisibility(VISIBLE);
|
|
||||||
|
|
||||||
album.setSlides(glideRequests, slides, showControls);
|
|
||||||
setTouchDelegate(album.getTouchDelegate());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setConversationColor(@ColorInt int color) {
|
|
||||||
if (album.getVisibility() == VISIBLE) {
|
|
||||||
album.setCellBackgroundColor(color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setThumbnailClickListener(SlideClickListener listener) {
|
|
||||||
thumbnail.setThumbnailClickListener(listener);
|
|
||||||
album.setThumbnailClickListener(listener);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDownloadClickListener(SlidesClickedListener listener) {
|
|
||||||
thumbnail.setDownloadClickListener(listener);
|
|
||||||
album.setDownloadClickListener(listener);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<FrameLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/album_thumbnail_root"
|
|
||||||
android:layout_width="@dimen/album_total_width"
|
|
||||||
android:layout_height="@dimen/album_4_total_height">
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.utilities.KThumbnailView
|
|
||||||
android:id="@+id/album_cell_1"
|
|
||||||
android:layout_width="@dimen/album_4_cell_size"
|
|
||||||
android:layout_height="@dimen/album_4_cell_size"
|
|
||||||
app:thumbnail_radius="0dp"/>
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.utilities.KThumbnailView
|
|
||||||
android:id="@+id/album_cell_2"
|
|
||||||
android:layout_width="@dimen/album_4_cell_size"
|
|
||||||
android:layout_height="@dimen/album_4_cell_size"
|
|
||||||
android:layout_gravity="right|end|top"
|
|
||||||
app:thumbnail_radius="0dp"/>
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.utilities.KThumbnailView
|
|
||||||
android:id="@+id/album_cell_3"
|
|
||||||
android:layout_width="@dimen/album_4_cell_size"
|
|
||||||
android:layout_height="@dimen/album_4_cell_size"
|
|
||||||
android:layout_gravity="left|start|bottom"
|
|
||||||
app:thumbnail_radius="0dp"/>
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.utilities.KThumbnailView
|
|
||||||
android:id="@+id/album_cell_4"
|
|
||||||
android:layout_width="@dimen/album_4_cell_size"
|
|
||||||
android:layout_height="@dimen/album_4_cell_size"
|
|
||||||
android:layout_gravity="right|end|bottom"
|
|
||||||
app:thumbnail_radius="0dp"/>
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
@ -1,43 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<FrameLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/album_thumbnail_root"
|
|
||||||
android:layout_width="@dimen/album_total_width"
|
|
||||||
android:layout_height="@dimen/album_5_total_height">
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.utilities.KThumbnailView
|
|
||||||
android:id="@+id/album_cell_1"
|
|
||||||
android:layout_width="@dimen/album_5_cell_size_big"
|
|
||||||
android:layout_height="@dimen/album_5_cell_size_big"
|
|
||||||
app:thumbnail_radius="0dp"/>
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.utilities.KThumbnailView
|
|
||||||
android:id="@+id/album_cell_2"
|
|
||||||
android:layout_width="@dimen/album_5_cell_size_big"
|
|
||||||
android:layout_height="@dimen/album_5_cell_size_big"
|
|
||||||
android:layout_gravity="right|end|top"
|
|
||||||
app:thumbnail_radius="0dp"/>
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.utilities.KThumbnailView
|
|
||||||
android:id="@+id/album_cell_3"
|
|
||||||
android:layout_width="@dimen/album_5_cell_size_small"
|
|
||||||
android:layout_height="@dimen/album_5_cell_size_small"
|
|
||||||
android:layout_gravity="left|start|bottom"
|
|
||||||
app:thumbnail_radius="0dp"/>
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.utilities.KThumbnailView
|
|
||||||
android:id="@+id/album_cell_4"
|
|
||||||
android:layout_width="@dimen/album_5_cell_size_small"
|
|
||||||
android:layout_height="@dimen/album_5_cell_size_small"
|
|
||||||
android:layout_gravity="center_horizontal|bottom"
|
|
||||||
app:thumbnail_radius="0dp"/>
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.utilities.KThumbnailView
|
|
||||||
android:id="@+id/album_cell_5"
|
|
||||||
android:layout_width="@dimen/album_5_cell_size_small"
|
|
||||||
android:layout_height="@dimen/album_5_cell_size_small"
|
|
||||||
android:layout_gravity="right|end|bottom"
|
|
||||||
app:thumbnail_radius="0dp"/>
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
@ -1,61 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<FrameLayout
|
|
||||||
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:id="@+id/album_thumbnail_root"
|
|
||||||
android:layout_width="@dimen/album_total_width"
|
|
||||||
android:layout_height="@dimen/album_5_total_height">
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.utilities.KThumbnailView
|
|
||||||
android:id="@+id/album_cell_1"
|
|
||||||
android:layout_width="@dimen/album_5_cell_size_big"
|
|
||||||
android:layout_height="@dimen/album_5_cell_size_big"
|
|
||||||
app:thumbnail_radius="0dp"/>
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.utilities.KThumbnailView
|
|
||||||
android:id="@+id/album_cell_2"
|
|
||||||
android:layout_width="@dimen/album_5_cell_size_big"
|
|
||||||
android:layout_height="@dimen/album_5_cell_size_big"
|
|
||||||
android:layout_gravity="right|end|top"
|
|
||||||
app:thumbnail_radius="0dp"/>
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.utilities.KThumbnailView
|
|
||||||
android:id="@+id/album_cell_3"
|
|
||||||
android:layout_width="@dimen/album_5_cell_size_small"
|
|
||||||
android:layout_height="@dimen/album_5_cell_size_small"
|
|
||||||
android:layout_gravity="left|start|bottom"
|
|
||||||
app:thumbnail_radius="0dp"/>
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.utilities.KThumbnailView
|
|
||||||
android:id="@+id/album_cell_4"
|
|
||||||
android:layout_width="@dimen/album_5_cell_size_small"
|
|
||||||
android:layout_height="@dimen/album_5_cell_size_small"
|
|
||||||
android:layout_gravity="center_horizontal|bottom"
|
|
||||||
app:thumbnail_radius="0dp"/>
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="@dimen/album_5_cell_size_small"
|
|
||||||
android:layout_height="@dimen/album_5_cell_size_small"
|
|
||||||
android:layout_gravity="right|end|bottom">
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.utilities.KThumbnailView
|
|
||||||
android:id="@+id/album_cell_5"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_gravity="center_horizontal|bottom"
|
|
||||||
app:thumbnail_radius="0dp"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/album_cell_overflow_text"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:gravity="center"
|
|
||||||
android:textSize="@dimen/text_size"
|
|
||||||
android:textColor="@color/core_white"
|
|
||||||
android:background="@color/transparent_black_40"
|
|
||||||
tools:text="+2" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
@ -1,48 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<merge
|
|
||||||
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">
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.conversation.v2.utilities.ThumbnailView
|
|
||||||
android:id="@+id/conversation_thumbnail_image"
|
|
||||||
android:layout_width="@dimen/media_bubble_default_dimens"
|
|
||||||
android:layout_height="@dimen/media_bubble_default_dimens"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:clickable="false"
|
|
||||||
android:longClickable="false"
|
|
||||||
android:scaleType="fitCenter"
|
|
||||||
android:contentDescription="@string/conversation_item__mms_image_description"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible"
|
|
||||||
app:thumbnail_radius="1dp"/>
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.components.AlbumThumbnailView
|
|
||||||
android:id="@+id/conversation_thumbnail_album"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:clickable="false"
|
|
||||||
android:longClickable="false"
|
|
||||||
android:contentDescription="@string/conversation_item__mms_image_description"
|
|
||||||
android:visibility="gone"/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/conversation_thumbnail_shade"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_gravity="bottom"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:src="@drawable/image_shade" />
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.components.ConversationItemFooter
|
|
||||||
android:id="@+id/conversation_thumbnail_footer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom"
|
|
||||||
android:layout_marginStart="@dimen/message_bubble_horizontal_padding"
|
|
||||||
android:layout_marginEnd="@dimen/message_bubble_horizontal_padding"
|
|
||||||
android:layout_marginBottom="@dimen/message_bubble_bottom_padding"
|
|
||||||
app:footer_text_color="@android:color/white"
|
|
||||||
app:footer_icon_color="@android:color/white"/>
|
|
||||||
|
|
||||||
</merge>
|
|
Loading…
Reference in New Issue