Notification requests (AND-154)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="?colorM3OnSurfaceVariant" android:state_enabled="true"/>
|
||||
<item android:color="?colorM3OnSurfaceVariant" android:alpha="0.38"/>
|
||||
<item android:color="?colorM3OnSurface" android:alpha="0.38"/>
|
||||
</selector>
|
||||
6
mastodon/src/main/res/drawable/bg_ava_badge.xml
Normal file
6
mastodon/src/main/res/drawable/bg_ava_badge.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="?colorM3Primary"/>
|
||||
<corners android:radius="100dp"/>
|
||||
<stroke android:color="?colorM3Background" android:width="1dp"/>
|
||||
</shape>
|
||||
9
mastodon/src/main/res/drawable/ic_check_wght700_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_check_wght700_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M9.55,18.8 L3.05,12.3 5.3,10.05 9.55,14.3 18.7,5.15 20.95,7.4Z"/>
|
||||
</vector>
|
||||
9
mastodon/src/main/res/drawable/ic_inventory_2_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_inventory_2_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M3,20V8.7Q2.575,8.425 2.288,8Q2,7.575 2,7V4Q2,3.175 2.588,2.587Q3.175,2 4,2H20Q20.825,2 21.413,2.587Q22,3.175 22,4V7Q22,7.575 21.712,8Q21.425,8.425 21,8.7V20Q21,20.825 20.413,21.413Q19.825,22 19,22H5Q4.175,22 3.587,21.413Q3,20.825 3,20ZM5,9V20Q5,20 5,20Q5,20 5,20H19Q19,20 19,20Q19,20 19,20V9ZM20,7Q20,7 20,7Q20,7 20,7V4Q20,4 20,4Q20,4 20,4H4Q4,4 4,4Q4,4 4,4V7Q4,7 4,7Q4,7 4,7ZM9,14H15V12H9ZM5,20Q5,20 5,20Q5,20 5,20V9V20Q5,20 5,20Q5,20 5,20Z"/>
|
||||
</vector>
|
||||
9
mastodon/src/main/res/drawable/ic_tune_24px.xml
Normal file
9
mastodon/src/main/res/drawable/ic_tune_24px.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M3,19V17H9V19ZM3,7V5H13V7ZM11,21V15H13V17H21V19H13V21ZM7,15V13H3V11H7V9H9V15ZM11,13V11H21V13ZM15,9V3H17V5H21V7H17V9Z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20.05,23.4 L16.975,20.275Q16.45,20.575 15.863,20.8Q15.275,21.025 14.625,21.15V18.675Q14.775,18.625 14.925,18.575Q15.075,18.525 15.225,18.45L12.625,15.8V22.025L6.45,15.85H1.95V8.15H5.2L0.55,3.35L2.2,1.7L21.725,21.725ZM20.5,17.075 L18.775,15.3Q19.2,14.55 19.413,13.712Q19.625,12.875 19.625,11.975Q19.625,9.65 18.225,7.812Q16.825,5.975 14.625,5.275V2.8Q17.875,3.525 19.95,6.087Q22.025,8.65 22.025,11.975Q22.025,13.4 21.625,14.675Q21.225,15.95 20.5,17.075ZM8.9,11.925ZM17.175,13.675 L14.625,11.075V7.65Q15.9,8.25 16.713,9.412Q17.525,10.575 17.525,12Q17.525,12.45 17.438,12.875Q17.35,13.3 17.175,13.675ZM12.625,9 L9.175,5.425 12.625,1.975ZM9.475,14.425V12.55L8.275,11.3H5.1V12.7H7.75Z"/>
|
||||
</vector>
|
||||
13
mastodon/src/main/res/layout/expanded_title_medium.xml
Normal file
13
mastodon/src/main/res/layout/expanded_title_medium.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/m3_headline_small"
|
||||
android:textColor="?colorM3OnSurface"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingBottom="24dp"
|
||||
android:paddingTop="4dp"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
tools:text="Very long title that does not fit on one line"/>
|
||||
83
mastodon/src/main/res/layout/item_notification_request.xml
Normal file
83
mastodon/src/main/res/layout/item_notification_request.xml
Normal file
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ava"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginVertical="20dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:importantForAccessibility="no"
|
||||
tools:src="#0f0"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/badge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="16dp"
|
||||
android:layout_alignEnd="@id/ava"
|
||||
android:layout_alignBottom="@id/ava"
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginBottom="-4dp"
|
||||
android:minWidth="16dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/bg_ava_badge"
|
||||
android:paddingHorizontal="4dp"
|
||||
android:textAppearance="@style/m3_label_small"
|
||||
android:textColor="?colorM3OnPrimary"
|
||||
tools:text="99+"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_allow"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
style="@style/Widget.Mastodon.M3.Button.Outlined"
|
||||
android:contentDescription="@string/allow_notifications"
|
||||
android:src="@drawable/ic_check_24px"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_mute"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_toStartOf="@id/btn_allow"
|
||||
android:layout_centerVertical="true"
|
||||
style="@style/Widget.Mastodon.M3.Button.Outlined"
|
||||
android:contentDescription="@string/mute_notifications"
|
||||
android:src="@drawable/ic_volume_off_24px"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:layout_toEndOf="@id/ava"
|
||||
android:layout_toStartOf="@id/btn_mute"
|
||||
android:layout_marginTop="14dp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="@style/m3_body_large"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="?colorM3OnSurface"
|
||||
tools:text="User Name"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_below="@id/name"
|
||||
android:layout_toEndOf="@id/ava"
|
||||
android:layout_toStartOf="@id/btn_mute"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="@style/m3_body_medium"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="?colorM3OnSurfaceVariant"
|
||||
tools:text="\@username@domain"/>
|
||||
|
||||
</RelativeLayout>
|
||||
15
mastodon/src/main/res/menu/notification_request.xml
Normal file
15
mastodon/src/main/res/menu/notification_request.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/mute"
|
||||
android:title="@string/mute_notifications"
|
||||
android:icon="@drawable/ic_volume_off_24px"
|
||||
android:checkable="true"
|
||||
android:showAsAction="always"/>
|
||||
<item
|
||||
android:id="@+id/allow"
|
||||
android:title="@string/allow_notifications"
|
||||
android:icon="@drawable/ic_check_24px"
|
||||
android:checkable="true"
|
||||
android:showAsAction="always"/>
|
||||
</menu>
|
||||
@@ -1,4 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/mark_all_read" android:icon="@drawable/ic_done_all_24px" android:title="@string/mark_all_notifications_read" android:showAsAction="always"/>
|
||||
<item
|
||||
android:id="@+id/mark_all_read"
|
||||
android:icon="@drawable/ic_done_all_24px"
|
||||
android:showAsAction="always"
|
||||
android:title="@string/mark_all_notifications_read" />
|
||||
<item
|
||||
android:id="@+id/filters"
|
||||
android:icon="@drawable/ic_tune_24px"
|
||||
android:showAsAction="always"
|
||||
android:title="@string/filter_notifications"/>
|
||||
</menu>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||
<string name="app_name" translatable="false">Mastodon</string>
|
||||
|
||||
<string name="log_in">Log in</string>
|
||||
@@ -728,4 +728,23 @@
|
||||
<string name="mute_conversation">Mute conversation</string>
|
||||
<string name="unmute_conversation">Unmute conversation</string>
|
||||
<string name="visibility_unlisted">Quiet public</string>
|
||||
<string name="filtered_notifications">Filtered notifications</string>
|
||||
<string name="filter_notifications">Filter out notifications from...</string>
|
||||
<string name="notification_filter_following">People you don’t follow</string>
|
||||
<string name="notification_filter_following_explanation">Until you manually approve them</string>
|
||||
<string name="notification_filter_followers">People not following you</string>
|
||||
<string name="notification_filter_followers_explanation">Including people who have been following you fewer than 3 days</string>
|
||||
<string name="notification_filter_new_accounts">New accounts</string>
|
||||
<string name="notification_filter_new_accounts_explanation">Created within the past 30 days</string>
|
||||
<string name="notification_filter_mentions">Unsolicited private mentions</string>
|
||||
<string name="notification_filter_mentions_explanation">Filtered unless it’s in reply to your own mention or if you follow the sender</string>
|
||||
<string name="allow_notifications">Allow notifications</string>
|
||||
<string name="mute_notifications">Mute notifications</string>
|
||||
<plurals name="x_people_you_may_know">
|
||||
<item quantity="one">%,d person you may know</item>
|
||||
<item quantity="other">%,d people you may know</item>
|
||||
</plurals>
|
||||
<string name="notifications_from_user">Notifications from %s</string>
|
||||
<string name="notifications_muted">Notifications from %s will be muted.</string>
|
||||
<string name="notifications_allowed">%s will now appear in your notification list.</string>
|
||||
</resources>
|
||||
@@ -215,6 +215,8 @@
|
||||
|
||||
<style name="Theme.Mastodon.Dialog.Alert" parent="android:Theme.Material.Light.Dialog.Alert">
|
||||
<item name="android:windowTitleStyle">@style/alert_title</item>
|
||||
<!-- it's unfortunate that https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/com/android/internal/widget/DialogTitle.java exists -->
|
||||
<item name="android:textAppearanceMedium">@style/alert_title</item>
|
||||
<item name="android:dialogPreferredPadding">24dp</item>
|
||||
<item name="android:windowBackground">@drawable/bg_alert</item>
|
||||
<item name="android:buttonBarButtonStyle">@style/Widget.Mastodon.ButtonBarButton</item>
|
||||
@@ -229,6 +231,7 @@
|
||||
|
||||
<style name="Theme.Mastodon.Dialog.Alert.Dark" parent="android:Theme.Material.Dialog.Alert">
|
||||
<item name="android:windowTitleStyle">@style/alert_title</item>
|
||||
<item name="android:textAppearanceMedium">@style/alert_title</item>
|
||||
<item name="android:dialogPreferredPadding">24dp</item>
|
||||
<item name="android:windowBackground">@drawable/bg_alert</item>
|
||||
<item name="android:buttonBarButtonStyle">@style/Widget.Mastodon.ButtonBarButton</item>
|
||||
@@ -314,6 +317,7 @@
|
||||
<style name="Widget.Mastodon.M3.Button.Outlined">
|
||||
<item name="android:background">@drawable/bg_button_m3_outlined</item>
|
||||
<item name="android:textColor">@color/button_text_m3_text</item>
|
||||
<item name="android:tint">@color/action_bar_icons</item>
|
||||
<item name="android:paddingLeft">24dp</item>
|
||||
<item name="android:paddingRight">24dp</item>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user