From 5cda112129e107066a94612250e07c236f50eae7 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Sun, 17 Sep 2023 09:26:33 -0300 Subject: [PATCH] refactor(PreviewlessMedia): move margin value to layout file --- .../displayitems/PreviewlessMediaGridStatusDisplayItem.java | 5 ++--- mastodon/src/main/res/layout/display_item_file.xml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PreviewlessMediaGridStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PreviewlessMediaGridStatusDisplayItem.java index 6ff73e2d2..e6dd9f389 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PreviewlessMediaGridStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PreviewlessMediaGridStatusDisplayItem.java @@ -73,10 +73,9 @@ public class PreviewlessMediaGridStatusDisplayItem extends StatusDisplayItem{ super(new FrameLayoutThatOnlyMeasuresFirstChild(activity)); wrapper=(FrameLayout)itemView; layout= new LinearLayout(activity); - LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); - params.setMargins(V.dp(16), 0, V.dp(16), 0); - layout.setLayoutParams(params); layout.setOrientation(LinearLayout.VERTICAL); + LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); + layout.setLayoutParams(params); wrapper.addView(layout); wrapper.setClipToPadding(false); diff --git a/mastodon/src/main/res/layout/display_item_file.xml b/mastodon/src/main/res/layout/display_item_file.xml index 9db212e7b..bf775980d 100644 --- a/mastodon/src/main/res/layout/display_item_file.xml +++ b/mastodon/src/main/res/layout/display_item_file.xml @@ -3,12 +3,12 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_marginHorizontal="16dp" android:layout_height="wrap_content">