Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to disable select?? #30

Open
alibadparva opened this issue Apr 8, 2020 · 1 comment
Open

how to disable select?? #30

alibadparva opened this issue Apr 8, 2020 · 1 comment

Comments

@alibadparva
Copy link

how to disable select and click??

@RobertApikyan
Copy link
Owner

You can disable the select event, for that use setOnSegmentSelectRequestListener method, and return false if you do not want to perform the select event

segmentedControl.setOnSegmentSelectRequestListener { segmentViewHolder -> false }
public interface OnSegmentSelectRequestListener<D> {
    /**
     * The event will be triggered before perform segment selection,and after segment click event
     *
     * @param segmentViewHolder, clicked segment view holder
     * @return false segment selection will be ignored, true segment selection will be performed
     */
    boolean onSegmentSelectRequest(SegmentViewHolder<D> segmentViewHolder);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants