I\'d like to find the view of a Tab in a TabLayout so that I can pass it to another function. I\'m not sure how to go about finding the view.
myTabLayout.getTabAt(0).getC
It returns null
because you're not using any Custom View in the first place. It returns the custom view only when you use it. For using the custom view, your code should be something like this.
tabLayout.addTab(tabLayout.newTab().setCustomView(R.layout.custom_view).setText("Page1"));
If you use the above line and then try to call myTabLayout.getTabAt(0).getCustomView()
, it'd return you the view that you set.