2019-01-15 00:41:05 -08:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<merge
|
|
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
|
|
|
2019-06-05 15:47:14 -04:00
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
2019-01-15 00:41:05 -08:00
|
|
|
android:id="@+id/linkpreview_container"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:padding="6dp"
|
2020-11-10 10:20:54 -05:00
|
|
|
android:background="@color/signal_background_primary">
|
2019-01-15 00:41:05 -08:00
|
|
|
|
|
|
|
<org.thoughtcrime.securesms.components.OutlinedThumbnailView
|
|
|
|
android:id="@+id/linkpreview_thumbnail"
|
|
|
|
android:layout_width="72dp"
|
|
|
|
android:layout_height="0dp"
|
2020-08-25 16:05:39 -04:00
|
|
|
android:maxHeight="72dp"
|
2019-01-15 00:41:05 -08:00
|
|
|
android:scaleType="centerCrop"
|
|
|
|
android:visibility="gone"
|
|
|
|
app:layout_constraintBottom_toTopOf="@+id/linkpreview_divider"
|
|
|
|
app:layout_constraintHeight_min="72dp"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="@+id/linkpreview_title"
|
|
|
|
tools:src="@drawable/ic_contact_picture"
|
|
|
|
tools:visibility="visible" />
|
|
|
|
|
|
|
|
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
|
|
|
android:id="@+id/linkpreview_title"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="8dp"
|
|
|
|
android:layout_marginEnd="8dp"
|
2020-08-25 16:05:39 -04:00
|
|
|
style="@style/Signal.Text.Preview"
|
2019-01-15 00:41:05 -08:00
|
|
|
android:ellipsize="end"
|
|
|
|
android:fontFamily="sans-serif-medium"
|
|
|
|
android:maxLines="2"
|
2020-11-10 10:20:54 -05:00
|
|
|
android:textColor="@color/signal_inverse_primary"
|
2019-01-15 00:41:05 -08:00
|
|
|
app:layout_constraintEnd_toStartOf="@+id/linkpreview_close"
|
|
|
|
app:layout_constraintHorizontal_bias="0.0"
|
|
|
|
app:layout_constraintStart_toEndOf="@+id/linkpreview_thumbnail"
|
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
2020-08-25 16:05:39 -04:00
|
|
|
tools:text="J. Jonah Jameson on Twitter" />
|
|
|
|
|
|
|
|
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
|
|
|
android:id="@+id/linkpreview_description"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="8dp"
|
|
|
|
android:layout_marginEnd="8dp"
|
|
|
|
style="@style/Signal.Text.Preview"
|
|
|
|
android:textSize="13sp"
|
|
|
|
android:ellipsize="end"
|
|
|
|
android:maxLines="15"
|
|
|
|
app:layout_constraintEnd_toStartOf="@+id/linkpreview_close"
|
|
|
|
app:layout_constraintHorizontal_bias="0.0"
|
|
|
|
app:layout_constraintStart_toEndOf="@+id/linkpreview_thumbnail"
|
|
|
|
app:layout_constraintTop_toBottomOf="@id/linkpreview_title"
|
|
|
|
tools:text="Wall crawler strikes again!" />
|
2019-01-15 00:41:05 -08:00
|
|
|
|
|
|
|
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
|
|
|
android:id="@+id/linkpreview_site"
|
|
|
|
style="@style/Signal.Text.Caption"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="8dp"
|
|
|
|
android:layout_marginTop="2dp"
|
2020-11-10 10:20:54 -05:00
|
|
|
android:textColor="@color/signal_text_secondary"
|
2020-08-26 16:03:52 -04:00
|
|
|
android:maxLines="2"
|
2019-01-15 00:41:05 -08:00
|
|
|
app:layout_constraintStart_toEndOf="@+id/linkpreview_thumbnail"
|
2020-08-25 16:05:39 -04:00
|
|
|
app:layout_constraintTop_toBottomOf="@+id/linkpreview_description"
|
2019-01-15 00:41:05 -08:00
|
|
|
tools:text="dailybugle.com" />
|
|
|
|
|
|
|
|
<View
|
|
|
|
android:id="@+id/linkpreview_divider"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="1dp"
|
|
|
|
android:layout_marginStart="8dp"
|
|
|
|
android:layout_marginTop="6dp"
|
2020-11-10 10:20:54 -05:00
|
|
|
android:background="@color/signal_divider_major"
|
2019-01-15 00:41:05 -08:00
|
|
|
android:visibility="gone"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintStart_toEndOf="@+id/linkpreview_thumbnail"
|
2020-11-18 11:33:44 -05:00
|
|
|
app:layout_constraintTop_toBottomOf="@+id/linkpreview_content_barrier"
|
2019-01-15 00:41:05 -08:00
|
|
|
app:layout_constraintVertical_bias="0.0"
|
|
|
|
tools:visibility="visible" />
|
|
|
|
|
2020-11-09 09:12:28 -05:00
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
2019-01-15 00:41:05 -08:00
|
|
|
android:id="@+id/linkpreview_close"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginEnd="6dp"
|
|
|
|
android:layout_marginTop="4dp"
|
|
|
|
android:src="@drawable/ic_close_white_18dp"
|
2019-10-07 15:43:36 -03:00
|
|
|
android:tint="@color/core_grey_70"
|
2019-01-15 00:41:05 -08:00
|
|
|
android:visibility="gone"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
|
|
tools:visibility="visible" />
|
|
|
|
|
|
|
|
<com.pnikosis.materialishprogress.ProgressWheel
|
|
|
|
android:id="@+id/linkpreview_progress_wheel"
|
|
|
|
android:layout_width="match_parent"
|
2020-08-13 13:50:38 -04:00
|
|
|
android:layout_height="0dp"
|
2019-01-15 00:41:05 -08:00
|
|
|
android:layout_gravity="center_horizontal"
|
|
|
|
android:layout_marginBottom="8dp"
|
|
|
|
android:indeterminate="true"
|
|
|
|
android:padding="8dp"
|
|
|
|
android:visibility="gone"
|
2020-08-13 13:50:38 -04:00
|
|
|
app:layout_constraintBottom_toBottomOf="@+id/linkpreview_no_preview"
|
2019-01-15 00:41:05 -08:00
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
2020-08-13 13:50:38 -04:00
|
|
|
app:layout_constraintTop_toTopOf="@id/linkpreview_no_preview"
|
2020-03-04 08:14:21 -05:00
|
|
|
app:matProg_barColor="@color/core_ultramarine"
|
2020-08-13 13:50:38 -04:00
|
|
|
app:matProg_progressIndeterminate="true"
|
|
|
|
app:matProg_barWidth="3dp"/>
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/linkpreview_no_preview"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2020-08-18 16:28:37 -03:00
|
|
|
android:gravity="center"
|
2020-08-13 13:50:38 -04:00
|
|
|
android:paddingTop="12dp"
|
|
|
|
android:paddingBottom="12dp"
|
|
|
|
android:visibility="gone"
|
2020-08-18 16:28:37 -03:00
|
|
|
app:layout_constraintBottom_toTopOf="@id/linkpreview_divider"
|
2020-08-13 13:50:38 -04:00
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
2020-08-18 16:28:37 -03:00
|
|
|
tools:text="@string/LinkPreviewView_no_link_preview_available" />
|
2019-01-15 00:41:05 -08:00
|
|
|
|
2020-11-18 11:33:44 -05:00
|
|
|
<androidx.constraintlayout.widget.Barrier
|
|
|
|
android:id="@+id/linkpreview_content_barrier"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
app:barrierDirection="bottom"
|
|
|
|
app:constraint_referenced_ids="linkpreview_thumbnail,linkpreview_close,linkpreview_title,linkpreview_description,linkpreview_site,linkpreview_progress_wheel,linkpreview_no_preview" />
|
|
|
|
|
2019-06-05 15:47:14 -04:00
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
2019-01-15 00:41:05 -08:00
|
|
|
|
|
|
|
</merge>
|