material-components-android
material-components-android copied to clipboard
[TabLayout] Fix TabView click listener customization
trafficstars
Closes https://github.com/material-components/material-components-android/issues/4105
Usage example:
TabLayout tabLayout = ...;
Tab firstTab = tabLayout.newTab()
.setText("Tab 1")
.setOnTabClickListener((tab) -> {
if (!isSomeCheckValid) {
// Show some error dialog.
return;
}
tab.select();
});
tabLayout.addTab(firstTab);
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.