diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-02-09 14:34:49 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-02-09 14:34:49 +0100 |
commit | 7aa49998425b768244715b19c9779202c0145230 (patch) | |
tree | 9c26023bfe027ac232df19a8e041fdd15265e5b1 /src/main/res/layout/link_layout.xml | |
parent | 42c3129b66fe555c37fa67b6421230199cc64968 (diff) |
show web link previews in chat
fixes #113
Diffstat (limited to 'src/main/res/layout/link_layout.xml')
-rw-r--r-- | src/main/res/layout/link_layout.xml | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/main/res/layout/link_layout.xml b/src/main/res/layout/link_layout.xml new file mode 100644 index 000000000..68e7a6cc7 --- /dev/null +++ b/src/main/res/layout/link_layout.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/rich_link_card" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="5dp" + android:gravity="center" + android:orientation="horizontal"> + + <ImageView + android:id="@+id/rich_link_image" + android:layout_width="80dp" + android:layout_height="80dp" + android:scaleType="centerCrop" /> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + android:padding="2dp"> + + <TextView + android:id="@+id/rich_link_title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:ellipsize="end" + android:maxLines="1" + android:padding="2dp" + android:textAppearance="@style/TextAppearance.Conversations.Body2" + tools:text="Data" /> + + <TextView + android:id="@+id/rich_link_desp" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:ellipsize="end" + android:maxLines="4" + android:padding="2dp" + android:textAppearance="@style/TextAppearance.Conversations.Status" + tools:text="Data" /> + + <TextView + android:id="@+id/rich_link_url" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:ellipsize="end" + android:maxLines="1" + android:padding="2dp" + android:textAppearance="@style/TextAppearance.Conversations.Body1.Secondary" + android:visibility="gone" + tools:text="Data" /> + + </LinearLayout> +</LinearLayout>
\ No newline at end of file |