I have the following XML layout and inside my ViewPager there is a fragment that I am in. From within that fragment how do I access the MaterialToolBar?
<DrawerLayout
<CoordinatorLayout
<ViewPager
<MaterialToolBar
I figured it out after an hour, you have to repeatedly keep finding the parent fragment until you hit the correct one....
In my case I had to do parentFragment?.parentFragment?.parentFragment?.my_toolbar?
Is that supposed to be a great grandparents or something ...