[Question] How to use TapTarget in Navigation Drawer ?
See original GitHub issueI tried many hours for making it work with TapTarget.forView
but without success…
I can’t succeed in getting the view of an item in the drawer. I tried the solution was there https://github.com/KeepSafe/TapTargetView/issues/210 but it doesn’t seem to be the adapted for.
If somebody could give me some suggestions, it would be nice. Thanks in advance.
I tried different things as the following way :
private void setupDrawerContent(NavigationView navigationView) {
NavigationMenuView test = ( NavigationMenuView ) navigationView.getChildAt(0);
Log.e("count", "parent "+ navigationView.getChildCount() + " child" + test.getChildCount());
}
The result was 1 et 0.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
Using TapTargetView on Navigation Drawer menu item
Solved this by setting app:contentDescription="name_here" to my <item> inside the <menu> Then just call navigationView.
Read more >Material Design Onboarding in Android- Quickstart (Tap Target)
In this tutorial, we'll learn about using the Quickstart model using TapTarget library. This is part of the updated Material Design guidelines ...
Read more >Material 3 Design Kit | Figma Community
The Material 3 Design Kit is built to work with the Material Theme Builder Figma ... Navigation drawers (Dark); Outline-variant color role; Keyboards...
Read more >Error When Running Taptargetview (Material Design For Help ...
Material Design Onboarding in Android- Quickstart (Tap Target). by ... Bottom navigation drawers are a specialized type of modal drawer for use with...
Read more >Material Design Android App Onboarding. A Tale From The ...
When a user opens the app for the first time, the drawer is opened with a circular ... that you can use, but...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You’re going to have to get a reference to the target view somehow. Unfortunately, it seems like this class doesnt expose a public API for doing that. Your next best option is reflection, similar to what I do for the Toolbar here: https://github.com/KeepSafe/TapTargetView/blob/master/taptargetview/src/main/java/com/getkeepsafe/taptargetview/ToolbarTapTarget.java
View drawerIcon = toolbar.getChildAt(1);
child depends on how your layout has been createdThen following simply the README you can pass it in forView method
TapTarget.forView(drawerIcon, "bla", "blabla")
Done 👯♂️