fix(notifications-banner): fix banner layout

This commit is contained in:
LucasGGamerM 2023-10-03 07:24:44 -03:00
parent f2030a8c26
commit a849ced203
2 changed files with 4 additions and 10 deletions

View File

@ -166,12 +166,6 @@ public class SettingsNotificationsFragment extends BaseSettingsFragment<Void>{
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);

View File

@ -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"/>
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="24dp"
android:layout_toEndOf="@id/icon"
android:layout_marginTop="-2dp"
android:layout_marginBottom="2dp"
android:textAppearance="@style/m3_title_medium"
android:textColor="?colorM3OnSurface"
android:singleLine="true"
android:gravity="center_vertical"
tools:text="Title"/>