material-components-android icon indicating copy to clipboard operation
material-components-android copied to clipboard

[TabLayout] Fix TabView click listener customization

Open vvinogra opened this issue 1 year ago • 2 comments
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);


vvinogra avatar Mar 17 '24 10:03 vvinogra

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.

google-cla[bot] avatar Mar 17 '24 10:03 google-cla[bot]