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

Disable seekbar when the contract enabler is false #133

Closed
Thames1990 opened this issue Jan 26, 2018 · 2 comments
Closed

Disable seekbar when the contract enabler is false #133

Thames1990 opened this issue Jan 26, 2018 · 2 comments
Labels

Comments

@Thames1990
Copy link

I'm trying to disable the seekbar of a preference in a KPrefActivity when the KPrefSeekbar.KPrefSeekbarContract enabler is false.

This is my contract:

fun KPrefSeekbar.KPrefSeekbarContract.dependsOnLocationPermission() {
    enabler = { hasPermission(Manifest.permission.ACCESS_FINE_LOCATION) }
    onDisabledClick = { snackbar(R.string.requires_location_permission) }
}

As you can see in this video, the preference is disabled, but the seekbar is still enabled. Can you guide me how to disable it?

Thames1990 added a commit to Thames1990/aardvark that referenced this issue Jan 26, 2018
Currently the seekbar is still enabled, but an issue for KAU has been opened:
AllanWang/KAU#133
@AllanWang
Copy link
Owner

AllanWang commented Jan 27, 2018

Thanks for the report. I would consider this as a bug, as I only disabled clicks when the preference is disabled. I will be fixing this shortly

@AllanWang
Copy link
Owner

You may use 91e4b0c immediately, or wait for the next release.

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

No branches or pull requests

2 participants