diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-12-19 11:25:34 +0300 |
---|---|---|
committer | Niedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com> | 2020-12-22 00:17:24 +0300 |
commit | c66a96fffff939a0f5dbedb7eda8f7967a079ff9 (patch) | |
tree | f2b384416828069e1af4fc4e366c04b735a0ed8b /app/src/main/java/it/niedermann/nextcloud/deck | |
parent | 969b35bb7a0cc79427b8d85b48c2cf6e5aca0a8d (diff) |
Highlight current board in drawer
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java | 1 | ||||
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/util/DrawerMenuUtil.java | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java index 06fa3186b..93ca02044 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/MainActivity.java @@ -654,6 +654,7 @@ public class MainActivity extends BrandedActivity implements DeleteStackListener startActivity(ArchivedBoardsActvitiy.createIntent(MainActivity.this, mainViewModel.getCurrentAccount())); break; default: + binding.navigationView.setCheckedItem(item); setCurrentBoard(boardsList.get(item.getItemId())); break; } 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 1a88bec97..43a9e6299 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 @@ -39,7 +39,9 @@ public class DrawerMenuUtil { SubMenu boardsMenu = menu.addSubMenu(R.string.simple_boards); int index = 0; for (Board board : boards) { - MenuItem m = boardsMenu.add(Menu.NONE, index++, Menu.NONE, board.getTitle()).setIcon(ViewUtil.getTintedImageView(context, R.drawable.circle_grey600_36dp, board.getColor())); + MenuItem m = boardsMenu + .add(Menu.NONE, index++, Menu.NONE, board.getTitle()).setIcon(ViewUtil.getTintedImageView(context, R.drawable.circle_grey600_36dp, board.getColor())) + .setCheckable(true); if (currentServerVersionIsSupported) { if (board.isPermissionManage()) { AppCompatImageButton contextMenu = new AppCompatImageButton(context); |