mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Add clickable links to notices/requests
This commit is contained in:
@@ -13,6 +13,7 @@ import static android.view.View.GONE;
|
||||
import static android.view.View.VISIBLE;
|
||||
import static org.briarproject.bramble.util.StringUtils.isNullOrEmpty;
|
||||
import static org.briarproject.bramble.util.StringUtils.trim;
|
||||
import static org.briarproject.briar.android.util.UiUtils.makeLinksClickable;
|
||||
|
||||
@UiThread
|
||||
@NotNullByDefault
|
||||
@@ -40,6 +41,7 @@ class ConversationNoticeViewHolder extends ConversationItemViewHolder {
|
||||
} else {
|
||||
msgText.setVisibility(VISIBLE);
|
||||
msgText.setText(trim(text));
|
||||
makeLinksClickable(msgText, listener::onLinkClick);
|
||||
layout.setBackgroundResource(isIncoming() ?
|
||||
R.drawable.notice_in_bottom : R.drawable.notice_out_bottom);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
android:layout_marginRight="@dimen/message_bubble_margin_non_tail"
|
||||
android:background="@drawable/msg_in_top"
|
||||
android:elevation="@dimen/message_bubble_elevation"
|
||||
android:textColorLink="@color/briar_text_link"
|
||||
android:autoLink="web"
|
||||
tools:text="Short message"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
android:background="@drawable/msg_out_top"
|
||||
android:elevation="@dimen/message_bubble_elevation"
|
||||
android:textColor="@color/briar_text_primary_inverse"
|
||||
android:textColorLink="@color/briar_text_link_inverse"
|
||||
android:autoLink="web"
|
||||
tools:text="This is a long long long message that spans over several lines.\n\nIt ends here."
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
android:background="@drawable/msg_in_top"
|
||||
android:elevation="@dimen/message_bubble_elevation"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textColorLink="@color/briar_text_link"
|
||||
android:autoLink="web"
|
||||
tools:text="Short message"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user