Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Niedermann <info@niedermann.it>2021-04-09 18:50:25 +0300
committerNiedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com>2021-04-10 14:38:50 +0300
commit763696b69b78e28ed643609eb8055689d7f58f22 (patch)
tree78e864aab31870009e7906d5ea293a925244cc06 /app/src/main/java/it/niedermann/nextcloud/deck/util
parente58becda69020ab84f01a00171b5e650adea7e75 (diff)
#690 Upcoming cards
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/util')
-rw-r--r--app/src/main/java/it/niedermann/nextcloud/deck/util/DrawerMenuUtil.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/util/DrawerMenuUtil.java b/app/src/main/java/it/niedermann/nextcloud/deck/util/DrawerMenuUtil.java
index 312dc7cf9..d315c1867 100644
--- a/app/src/main/java/it/niedermann/nextcloud/deck/util/DrawerMenuUtil.java
+++ b/app/src/main/java/it/niedermann/nextcloud/deck/util/DrawerMenuUtil.java
@@ -2,7 +2,6 @@ package it.niedermann.nextcloud.deck.util;
import android.view.Menu;
import android.view.MenuItem;
-import android.view.SubMenu;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.AppCompatImageButton;
@@ -25,6 +24,7 @@ public class DrawerMenuUtil {
public static final int MENU_ID_ADD_BOARD = -2;
public static final int MENU_ID_SETTINGS = -3;
public static final int MENU_ID_ARCHIVED_BOARDS = -4;
+ public static final int MENU_ID_UPCOMING_CARDS = -5;
private DrawerMenuUtil() {
throw new UnsupportedOperationException("This class must not get instantiated");
@@ -36,10 +36,10 @@ public class DrawerMenuUtil {
@NonNull List<Board> boards,
boolean hasArchivedBoards,
boolean currentServerVersionIsSupported) {
- final SubMenu boardsMenu = menu.addSubMenu(R.string.simple_boards);
+ menu.add(Menu.NONE, MENU_ID_UPCOMING_CARDS, Menu.NONE, R.string.widget_upcoming_title).setIcon(R.drawable.calendar_blank_grey600_24dp);
int index = 0;
for (Board board : boards) {
- final MenuItem m = boardsMenu
+ final MenuItem m = menu
.add(Menu.NONE, index++, Menu.NONE, board.getTitle()).setIcon(ViewUtil.getTintedImageView(context, R.drawable.circle_grey600_36dp, board.getColor()))
.setCheckable(true);
if (currentServerVersionIsSupported) {
@@ -92,11 +92,11 @@ public class DrawerMenuUtil {
}
if (hasArchivedBoards) {
- boardsMenu.add(Menu.NONE, MENU_ID_ARCHIVED_BOARDS, Menu.NONE, R.string.archived_boards).setIcon(ViewUtil.getTintedImageView(context, R.drawable.ic_archive_white_24dp, ContextCompat.getColor(context, R.color.grey600)));
+ menu.add(Menu.NONE, MENU_ID_ARCHIVED_BOARDS, Menu.NONE, R.string.archived_boards).setIcon(ViewUtil.getTintedImageView(context, R.drawable.ic_archive_white_24dp, ContextCompat.getColor(context, R.color.grey600)));
}
if (currentServerVersionIsSupported) {
- boardsMenu.add(Menu.NONE, MENU_ID_ADD_BOARD, Menu.NONE, R.string.add_board).setIcon(R.drawable.ic_add_grey_24dp);
+ menu.add(Menu.NONE, MENU_ID_ADD_BOARD, Menu.NONE, R.string.add_board).setIcon(R.drawable.ic_add_grey_24dp);
}
menu.add(Menu.NONE, MENU_ID_SETTINGS, Menu.NONE, R.string.simple_settings).setIcon(R.drawable.ic_settings_grey600_24dp);