-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a popup for the notification actions
- Loading branch information
Jarvis Lin
committed
Feb 5, 2024
1 parent
8ce1152
commit 0c319da
Showing
6 changed files
with
109 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
WordPress/src/main/res/layout/notification_action_menu.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content"> | ||
|
||
<ImageView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:background="?attr/selectableItemBackground" | ||
android:padding="@dimen/notifications_item_action_padding" | ||
android:src="@drawable/more_vertical" /> | ||
</FrameLayout> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
app:cardBackgroundColor="?colorSurface" | ||
app:cardCornerRadius="@dimen/notifications_popup_radius"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content"> | ||
|
||
<TextView | ||
android:id="@+id/text_mark_all_as_read" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:drawablePadding="@dimen/notifications_item_action_padding" | ||
android:paddingEnd="@dimen/notifications_item_action_padding_end" | ||
android:paddingStart="@dimen/notifications_item_action_padding" | ||
android:paddingVertical="@dimen/notifications_item_action_padding" | ||
android:text="@string/notifications_action_mark_all_as_read" | ||
android:textColor="?wpColorOnSurfaceHigh" | ||
android:textSize="@dimen/text_sz_large" | ||
app:drawableStartCompat="@drawable/ic_check_24px" | ||
app:drawableTint="?wpColorOnSurfaceHigh" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/text_settings" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:drawablePadding="@dimen/notifications_item_action_padding" | ||
android:paddingEnd="@dimen/notifications_item_action_padding_end" | ||
android:paddingStart="@dimen/notifications_item_action_padding" | ||
android:paddingVertical="@dimen/notifications_item_action_padding" | ||
android:text="@string/notification_settings" | ||
android:textColor="?wpColorOnSurfaceHigh" | ||
android:textSize="@dimen/text_sz_large" | ||
app:drawableStartCompat="@drawable/ic_cog_white_24dp" | ||
app:drawableTint="?wpColorOnSurfaceHigh" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/divider" /> | ||
|
||
<View | ||
android:id="@+id/divider" | ||
android:layout_width="0dp" | ||
android:layout_height="1px" | ||
android:background="@color/grey_300" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/text_mark_all_as_read" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
</androidx.cardview.widget.CardView> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
|
||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
<item | ||
android:id="@+id/notifications_settings" | ||
android:icon="@drawable/ic_cog_white_24dp" | ||
android:title="@string/notification_settings" | ||
android:id="@+id/notifications_actions" | ||
android:title="@string/more" | ||
app:actionLayout="@layout/notification_action_menu" | ||
app:showAsAction="always"/> | ||
|
||
</menu> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters