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

Add option to keep popup open after clicking on item #45

Merged
merged 1 commit into from
Apr 15, 2019
Merged

Add option to keep popup open after clicking on item #45

merged 1 commit into from
Apr 15, 2019

Conversation

Tunous
Copy link
Contributor

@Tunous Tunous commented Apr 14, 2019

Adds a way to specify for each item whether clicking on it should dismiss the popup or keep it visible. It can be specified by setting the dismissOnSelect property.

Example

val popupMenu = popupMenu {
     section {
        /* ... */
        item {
            label = "Stay open when clicked"
            dismissOnSelect = false
            callback = {
                Toast.makeText(this@LightActivity, "Clicked!", Toast.LENGTH_SHORT).show()
            }
        }
    }
}

2019-04-14_13-15-39

@zawadz88 zawadz88 added this to the 3.3.0 milestone Apr 15, 2019
Copy link
Owner

@zawadz88 zawadz88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@zawadz88 zawadz88 merged commit 3abe559 into zawadz88:master Apr 15, 2019
@Tunous Tunous deleted the feature/click-keep-open branch April 15, 2019 14:48
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

Successfully merging this pull request may close these issues.

2 participants