updating url preview to match new designs
This commit is contained in:
parent
f1d8b9e974
commit
952ceced05
|
@ -0,0 +1,23 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillAlpha="0.9"
|
||||
android:fillColor="#E3E8F0"
|
||||
android:pathData="M24,12C24,18.6274 18.6274,24 12,24C5.3726,24 0,18.6274 0,12C0,5.3726 5.3726,0 12,0C18.6274,0 24,5.3726 24,12Z"
|
||||
android:strokeAlpha="0.9" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M7.9998,7.9998L15.9998,15.9998"
|
||||
android:strokeWidth="1.33333"
|
||||
android:strokeColor="#737D8C"
|
||||
android:strokeLineCap="round" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M16.0005,7.9998L8.0006,15.9998"
|
||||
android:strokeWidth="1.33333"
|
||||
android:strokeColor="#737D8C"
|
||||
android:strokeLineCap="round" />
|
||||
</vector>
|
|
@ -7,83 +7,79 @@
|
|||
android:layout_height="wrap_content"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
||||
|
||||
<View
|
||||
android:id="@+id/url_preview_left_border"
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="?vctr_content_tertiary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:cardCornerRadius="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/url_preview_title"
|
||||
style="@style/Widget.Vector.TextView.Body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="7dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="?vctr_content_primary"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toStartOf="@id/url_preview_close"
|
||||
app:layout_constraintStart_toStartOf="@id/url_preview_left_border"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Jo Malone denounces her former brand's John Boyega decision" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/url_preview_image"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="157dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:importantForAccessibility="no"
|
||||
android:scaleType="fitStart"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/url_preview_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/url_preview_title"
|
||||
tools:src="@tools:sample/backgrounds/scenic" />
|
||||
<ImageView
|
||||
android:id="@+id/url_preview_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:adjustViewBounds="true"
|
||||
android:importantForAccessibility="no"
|
||||
android:scaleType="fitXY"
|
||||
tools:src="@tools:sample/backgrounds/scenic" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/url_preview_description"
|
||||
style="@style/Widget.Vector.TextView.Body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="4"
|
||||
android:textColor="?vctr_content_secondary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/url_preview_left_border"
|
||||
app:layout_constraintTop_toBottomOf="@id/url_preview_image"
|
||||
tools:text="The British perfumer says removing actor John Boyega from his own advert was “utterly despicable”." />
|
||||
<TextView
|
||||
android:id="@+id/url_preview_site"
|
||||
style="@style/Widget.Vector.TextView.Caption"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="?vctr_content_secondary"
|
||||
tools:text="BBC News" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/url_preview_site"
|
||||
style="@style/Widget.Vector.TextView.Body"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="?vctr_content_tertiary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/url_preview_left_border"
|
||||
app:layout_constraintTop_toBottomOf="@id/url_preview_description"
|
||||
tools:text="BBC News" />
|
||||
<TextView
|
||||
android:id="@+id/url_preview_title"
|
||||
style="@style/Widget.Vector.TextView.Body.Medium"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="?vctr_content_primary"
|
||||
android:textStyle="bold"
|
||||
tools:text="Jo Malone denounces her former brand's John Boyega decision" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/url_preview_close"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:contentDescription="@string/action_close"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_close_24dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tint="?vctr_content_secondary"
|
||||
tools:ignore="MissingPrefix" />
|
||||
<TextView
|
||||
android:id="@+id/url_preview_description"
|
||||
style="@style/Widget.Vector.TextView.Body"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="?vctr_content_secondary"
|
||||
tools:text="The British perfumer says removing actor John Boyega from his own advert was “utterly despicable”." />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/url_preview_close"
|
||||
android:layout_width="@dimen/layout_touch_size"
|
||||
android:layout_height="@dimen/layout_touch_size"
|
||||
android:layout_gravity="top|end"
|
||||
android:contentDescription="@string/action_close"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_close_with_circular_bg"
|
||||
tools:ignore="MissingPrefix" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</merge>
|
Loading…
Reference in New Issue