fix deleting notifications
closes sk22#677 closes sk22#633
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingLeft="16dp">
|
||||
android:paddingHorizontal="16dp">
|
||||
<!-- paddingEnd is set programmatically (depending on item.inset) -->
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/buttons"
|
||||
@@ -72,6 +72,17 @@
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/more"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:actionBarItemBackground"
|
||||
android:scaleType="center"
|
||||
android:tint="?colorM3OnSurfaceVariant"
|
||||
android:tooltipText="@string/more_options"
|
||||
android:contentDescription="@string/more_options"
|
||||
android:src="@drawable/ic_fluent_more_vertical_20_filled" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/delete_notification"
|
||||
android:layout_width="36dp"
|
||||
@@ -83,17 +94,6 @@
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_fluent_dismiss_20_filled"
|
||||
android:tint="?colorM3OnSurfaceVariant" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/more"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:actionBarItemBackground"
|
||||
android:scaleType="center"
|
||||
android:tint="?colorM3OnSurfaceVariant"
|
||||
android:tooltipText="@string/more_options"
|
||||
android:contentDescription="@string/more_options"
|
||||
android:src="@drawable/ic_fluent_more_vertical_20_filled" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
|
||||
@@ -1,63 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:background="?android:selectableItemBackground"
|
||||
android:paddingHorizontal="16dp">
|
||||
<!-- paddingEnd is set programmatically (depending on enableDeleteNotifications) -->
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:importantForAccessibility="no"
|
||||
tools:tint="#0f0"
|
||||
tools:src="@drawable/ic_fluent_arrow_repeat_all_24_filled"/>
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="64dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="?android:selectableItemBackground">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="12dp"/>
|
||||
|
||||
<org.joinmastodon.android.ui.views.HeaderSubtitleLinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:textAppearance="@style/m3_body_large"
|
||||
android:textColor="?colorM3OnSurface"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
tools:text="Notification text"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/separator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="4sp"
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:importantForAccessibility="no"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/m3_body_medium"
|
||||
android:textColor="?colorM3OnSurfaceVariant"
|
||||
android:text="@string/sk_separator"/>
|
||||
tools:tint="#0f0"
|
||||
tools:src="@drawable/ic_fluent_arrow_repeat_all_24_filled"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timestamp"
|
||||
<ImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="12dp"/>
|
||||
|
||||
<org.joinmastodon.android.ui.views.HeaderSubtitleLinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="56sp"
|
||||
android:textAppearance="@style/m3_body_medium"
|
||||
android:textColor="?colorM3OnSurfaceVariant"
|
||||
android:maxLines="1"
|
||||
tools:text="42m ago"/>
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</org.joinmastodon.android.ui.views.HeaderSubtitleLinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:textAppearance="@style/m3_body_large"
|
||||
android:textColor="?colorM3OnSurface"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
tools:text="Notification text"/>
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/separator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="4sp"
|
||||
android:importantForAccessibility="no"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/m3_body_medium"
|
||||
android:textColor="?colorM3OnSurfaceVariant"
|
||||
android:text="@string/sk_separator"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/timestamp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="56sp"
|
||||
android:textAppearance="@style/m3_body_medium"
|
||||
android:textColor="?colorM3OnSurfaceVariant"
|
||||
android:maxLines="1"
|
||||
tools:text="42m ago"/>
|
||||
|
||||
</org.joinmastodon.android.ui.views.HeaderSubtitleLinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/delete_notification"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="48dp"
|
||||
android:visibility="gone"
|
||||
android:background="?android:actionBarItemBackground"
|
||||
android:contentDescription="@string/sk_delete_notification"
|
||||
android:tooltipText="@string/sk_delete_notification"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_fluent_dismiss_20_filled"
|
||||
android:tint="?colorM3OnSurfaceVariant" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user