Skip to content

Handle CCP ClickListener Manually

Harsh B. Bhakta edited this page Oct 12, 2018 · 1 revision

There are some scenarios where developers wants to handle ccp click manually. Option to override clickListener was introduced in v2.2.3.

To override default click add following to your code.

        ccp.overrideClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //your code here.....
                
                //using following code you can launch
                //ccp country selection dialog manually (if required)
                // ccp.launchCountrySelectionDialog();
            }
        });

To remove override and switch back to the default clickListener, use

     ccp.overrideClickListener(null); 
Clone this wiki locally