mikepenz / MaterialDrawer

The flexible, easy to use, all in one drawer library for your Android project. Now brand new with material 2 design.
https://mikepenz.dev
Apache License 2.0
11.67k stars 2.05k forks source link

Get Drawer Item as a View #2739

Closed shivamsoods closed 3 years ago

shivamsoods commented 3 years ago

About this issue

Hey I would like to get the drawer item as view instead of IDrawerItem. I have implemented a tap-intro-library and it needs a view to process. I have tried to get the view by accessing the drawer recycler view but that doesn't differentiate between different items.

Is there any other way to use the drawer items with the given library?

Details

mikepenz commented 3 years ago

@shivamsoods the Drawer uses an RecyclerView to display the elements. as such list items are re-used and you can not directly reference the view as it may run out of view.

If you really need to get the view, you could scroll to the view in the RV, and then get the view based on its position.

This is unrelated to this library though, and more related to RecyclerViews and view recycling.

shivamsoods commented 3 years ago

Okay. I tried that and selected that view which was visible but the view is not being properly bounded in the tap intro library. The item selected in the intro view is the entire drawer (recycler view).

Thank you so much. Will look more into it and try to figure out from where is this issue arising-> Tap Intro View or from recycler view's item.