mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
[android] highlight selected conversation messages in UI
This commit is contained in:
@@ -20,6 +20,7 @@ import static org.briarproject.briar.android.util.UiUtils.formatDate;
|
||||
abstract class ConversationItemViewHolder extends ViewHolder {
|
||||
|
||||
protected final ConversationListener listener;
|
||||
private final View root;
|
||||
protected final ConstraintLayout layout;
|
||||
@Nullable
|
||||
private final OutItemViewHolder outViewHolder;
|
||||
@@ -33,6 +34,7 @@ abstract class ConversationItemViewHolder extends ViewHolder {
|
||||
super(v);
|
||||
this.listener = listener;
|
||||
this.outViewHolder = isIncoming ? null : new OutItemViewHolder(v);
|
||||
root = v;
|
||||
layout = v.findViewById(R.id.layout);
|
||||
text = v.findViewById(R.id.text);
|
||||
time = v.findViewById(R.id.time);
|
||||
@@ -41,6 +43,7 @@ abstract class ConversationItemViewHolder extends ViewHolder {
|
||||
@CallSuper
|
||||
void bind(ConversationItem item, boolean selected) {
|
||||
itemKey = item.getKey();
|
||||
root.setActivated(selected);
|
||||
|
||||
if (item.getText() != null) {
|
||||
text.setText(trim(item.getText()));
|
||||
|
||||
@@ -44,8 +44,8 @@ class ConversationMessageViewHolder extends ConversationItemViewHolder {
|
||||
timeColorBubble = getColor(v.getContext(), R.color.briar_white);
|
||||
|
||||
// clone constraint sets from layout files
|
||||
textConstraints
|
||||
.clone(v.getContext(), R.layout.list_item_conversation_msg_in);
|
||||
textConstraints.clone(v.getContext(),
|
||||
R.layout.list_item_conversation_msg_in_content);
|
||||
imageConstraints.clone(v.getContext(),
|
||||
R.layout.list_item_conversation_msg_image);
|
||||
imageTextConstraints.clone(v.getContext(),
|
||||
|
||||
Reference in New Issue
Block a user