worker8 / TourGuide

TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View
MIT License
2.63k stars 416 forks source link

Support for BottomNavigation menu items #137

Open dimgrav opened 6 years ago

dimgrav commented 6 years ago

Hi,

I want to implement an app tour which mainly includes BottomNavigation items. I casted MenuItem to View like the code snippet below, but it doesn't do the trick (which I didn't expect it to do anyway).

TourGuide tourHandler = TourGuide.init(this).with(TourGuide.Technique.CLICK)
                .setPointer(new Pointer())
                .setToolTip(new ToolTip().setTitle("Title").setDescription("Description"))
                .setOverlay(new Overlay())
                .playOn(((View)bottomNav.getMenu().getItem(2)));

playOn(bottomNav.getMenu().getItem(2).getActionView()) returns NullPointerException as well.

Is there support for BottomNavigation and OptionsMenu?

jackyhieu1211-hn commented 4 years ago

try change ((View)bottomNav.getMenu().getItem(2)) to findViewbyId