diff --git a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java index 1012317d..6c4ed2b3 100644 --- a/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/adapter/StatusBaseViewHolder.java @@ -111,6 +111,8 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder { bookmarkButton = itemView.findViewById(R.id.status_bookmark); moreButton = itemView.findViewById(R.id.status_more); + itemView.findViewById(R.id.status_media_preview_container).setClipToOutline(true); + mediaPreviews = new MediaPreviewImageView[]{ itemView.findViewById(R.id.status_media_preview_0), itemView.findViewById(R.id.status_media_preview_1), diff --git a/app/src/main/java/com/keylesspalace/tusky/components/report/adapter/StatusViewHolder.kt b/app/src/main/java/com/keylesspalace/tusky/components/report/adapter/StatusViewHolder.kt index 40d5093f..2007c2ac 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/report/adapter/StatusViewHolder.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/report/adapter/StatusViewHolder.kt @@ -61,6 +61,7 @@ class StatusViewHolder( adapterHandler.setStatusChecked(status, isChecked) } } + itemView.status_media_preview_container.clipToOutline = true } fun bind(status: Status) { diff --git a/app/src/main/res/drawable/media_preview_outline.xml b/app/src/main/res/drawable/media_preview_outline.xml new file mode 100644 index 00000000..a15ba5c8 --- /dev/null +++ b/app/src/main/res/drawable/media_preview_outline.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_conversation.xml b/app/src/main/res/layout/item_conversation.xml index 55b0dd0d..49fcd65e 100644 --- a/app/src/main/res/layout/item_conversation.xml +++ b/app/src/main/res/layout/item_conversation.xml @@ -243,6 +243,7 @@ android:layout_height="@dimen/status_media_preview_height" android:layout_marginStart="4dp" android:layout_marginTop="4dp" + android:background="@drawable/media_preview_outline" android:scaleType="centerCrop" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@+id/status_media_preview_2" @@ -314,11 +315,14 @@ android:id="@+id/status_sensitive_media_warning" android:layout_width="0dp" android:layout_height="0dp" - android:background="?attr/sensitive_media_warning_background_color" + android:background="@drawable/media_warning_bg" android:gravity="center" android:lineSpacingMultiplier="1.2" android:orientation="vertical" - android:padding="8dp" + android:paddingLeft="12dp" + android:paddingTop="8dp" + android:paddingRight="12dp" + android:paddingBottom="8dp" android:textAlignment="center" android:textColor="@android:color/white" android:textSize="?attr/status_text_medium" diff --git a/app/src/main/res/layout/item_report_status.xml b/app/src/main/res/layout/item_report_status.xml index 7b4c4bd1..a84a3257 100644 --- a/app/src/main/res/layout/item_report_status.xml +++ b/app/src/main/res/layout/item_report_status.xml @@ -90,6 +90,7 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/status_media_preview_margin_top" android:layout_marginEnd="8dp" + android:background="@drawable/media_preview_outline" app:layout_constraintEnd_toStartOf="@id/barrierEnd" app:layout_constraintStart_toStartOf="@id/guideBegin" app:layout_constraintTop_toBottomOf="@id/buttonToggleContent" diff --git a/app/src/main/res/layout/item_status.xml b/app/src/main/res/layout/item_status.xml index 3ee561fc..bbed3e03 100644 --- a/app/src/main/res/layout/item_status.xml +++ b/app/src/main/res/layout/item_status.xml @@ -184,6 +184,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginTop="@dimen/status_media_preview_margin_top" + android:background="@drawable/media_preview_outline" android:importantForAccessibility="noHideDescendants" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="@id/status_display_name" diff --git a/app/src/main/res/layout/item_status_detailed.xml b/app/src/main/res/layout/item_status_detailed.xml index 23e6f8ae..b2accd48 100644 --- a/app/src/main/res/layout/item_status_detailed.xml +++ b/app/src/main/res/layout/item_status_detailed.xml @@ -203,6 +203,7 @@ android:layout_height="wrap_content" android:layout_marginTop="12dp" android:layout_marginBottom="4dp" + android:background="@drawable/media_preview_outline" android:importantForAccessibility="noHideDescendants" app:layout_constraintTop_toBottomOf="@id/card_view"> @@ -319,7 +320,10 @@ android:gravity="center" android:lineSpacingMultiplier="1.2" android:orientation="vertical" - android:padding="8dp" + android:paddingLeft="12dp" + android:paddingTop="8dp" + android:paddingRight="12dp" + android:paddingBottom="8dp" android:textAlignment="center" android:textColor="@android:color/white" android:textSize="?attr/status_text_medium"