Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Add Debug item programmatically (#5890)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtwalli authored Mar 8, 2023
1 parent 649c51f commit 45b2d14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ class HomeFragment : Fragment(R.layout.home_fragment_layout), AutoInject {
}

private fun setupDebugMenu(menu: Menu) {
menu.findItem(R.id.test_nav_graph).isVisible = CWADebug.isDeviceForTestersBuild
if (CWADebug.isDeviceForTestersBuild) {
menu.add(Menu.NONE, R.id.test_nav_graph, menu.size() + 1, "Test Menu")
}
}

private fun MaterialToolbar.setupMenuItemClickListener() {
Expand Down
6 changes: 0 additions & 6 deletions Corona-Warn-App/src/main/res/menu/menu_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,4 @@
android:id="@+id/mainOverviewFragment"
android:icon="@drawable/ic_menu_overview"
android:title="@string/menu_help" />

<item
android:id="@+id/test_nav_graph"
android:title="Test Menu"
android:visible="false"
tools:ignore="HardcodedText" />
</menu>

0 comments on commit 45b2d14

Please sign in to comment.