Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NavigationDrawerItem does not work in footer #2558

Closed
6 tasks done
T-bond opened this issue Feb 16, 2020 · 0 comments
Closed
6 tasks done

NavigationDrawerItem does not work in footer #2558

T-bond opened this issue Feb 16, 2020 · 0 comments
Assignees

Comments

@T-bond
Copy link

T-bond commented Feb 16, 2020

About this issue

  • NavigationDrawerItem does not navigates to new fragment when added as StickyDrawerItem
    In the example, I added the settings item to the normal drawer items, and to the sticky footer items.
    The normal drawer item works correctly (navigates on click), but the sticky one not.
    My goal is to only have the sticky one, but it only hides the drawer when clicked on it. (After opening it again, I can observe that it does not get selected)

Note: It does not work when only the footer one added (not the normal drawer item), I just added it in the example to show the difference.

val navOverview = PrimaryDrawerItem().apply {
    name = StringHolder(R.string.menu_overView)
    icon = ImageHolder(IconicsDrawable(this@MainActivity,  CommunityMaterial.Icon2.cmd_view_dashboard))
    isIconTinted = true
}
val navSettings = PrimaryDrawerItem().apply {
    name = StringHolder(R.string.menu_settings)
    icon = ImageHolder(IconicsDrawable(this@MainActivity,  CommunityMaterial.Icon.cmd_cogs))
    isIconTinted = true
}

nav_view.itemAdapter.add(
        NavigationDrawerItem(R.id.nav_overview, navOverview, null, null),
        NavigationDrawerItem(R.id.nav_settings, navSettings, null, null)
)
nav_view.addStickyDrawerItems(NavigationDrawerItem(R.id.nav_settings, navSettings, null, null))

Details

  • [8.0.0-b02] Used library version
  • [2.2.1] Used support library version
  • [5.4.1] Used gradle build tools version
  • [3.5.3 AS] Used tooling / Android Studio version
  • [Iconincs, AndroidX] Other used libraries, potential conflicting libraries

Checklist

@mikepenz mikepenz self-assigned this Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants