From a849ced203586107c5be8be3c6584ba8b7d5cbbf Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Tue, 3 Oct 2023 07:24:44 -0300 Subject: [PATCH] fix(notifications-banner): fix banner layout --- .../fragments/settings/SettingsNotificationsFragment.java | 6 ------ mastodon/src/main/res/layout/item_settings_banner.xml | 8 ++++---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsNotificationsFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsNotificationsFragment.java index 2af1a4436..d3ac6e8cb 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsNotificationsFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsNotificationsFragment.java @@ -166,12 +166,6 @@ public class SettingsNotificationsFragment extends BaseSettingsFragment{ bannerAdapter.setVisible(false); banner.findViewById(R.id.button2).setVisibility(View.GONE); banner.findViewById(R.id.title).setVisibility(View.GONE); - ((RelativeLayout.LayoutParams) bannerText.getLayoutParams()) - .setMargins(0, V.dp(4), 0, 0); - ((RelativeLayout.LayoutParams) bannerIcon.getLayoutParams()) - .addRule(RelativeLayout.CENTER_VERTICAL); - RelativeLayout.LayoutParams buttonParams = (RelativeLayout.LayoutParams) bannerButton.getLayoutParams(); - buttonParams.setMargins(buttonParams.leftMargin, V.dp(-8), buttonParams.rightMargin, V.dp(-12)); mergeAdapter=new MergeRecyclerAdapter(); mergeAdapter.addAdapter(bannerAdapter); diff --git a/mastodon/src/main/res/layout/item_settings_banner.xml b/mastodon/src/main/res/layout/item_settings_banner.xml index 4227151e2..8b8de1818 100644 --- a/mastodon/src/main/res/layout/item_settings_banner.xml +++ b/mastodon/src/main/res/layout/item_settings_banner.xml @@ -13,23 +13,23 @@ android:id="@+id/icon" android:layout_width="40dp" android:layout_height="40dp" - android:layout_marginEnd="24dp" + android:layout_marginEnd="16dp" android:scaleType="center" android:importantForAccessibility="no" android:tint="?colorM3OnPrimaryContainer" android:background="@drawable/white_circle" android:backgroundTint="?colorM3PrimaryContainer" - tools:src="@drawable/ic_fluent_alert_snooze_24_regular"/> + tools:src="@drawable/ic_notifications_paused_24px"/>