Open cjohn001 opened 1 year ago
@cjohn001 Can you try disabling it using property isEnabled
instead?
@CatchABus Yes using isEnabled is indeed working. However, the style of the slider then changes to semitransparent which I do not want and I seem to not be able to overwrite the style with a custom css class.
@vallemar, thanks for publishing the workaround, I found one already. However, would be nice to see the source of the issue fixed.
@cjohn001 what has been your solution? I want to do a PR on the core and I would like to see your approach
@vallemar, I have one slider without functionality and another one as overlay and switch visibility between them. This works for me as the disabled position of the slider is always the same.
@cjohn001 what has been your solution? I want to do a PR on the core and I would like to see your approach
Perhaps, one good solution would be to add a boolean check in there: https://github.com/NativeScript/NativeScript/blob/main/packages/core/ui/core/view/index.android.ts#L99
Though, we have to know how this affects touch propagation among parent and child.
@CatchABus: My solution is actually nothing to recommend. As mentioned I simply switch visibility between two sliders:
I think it would be best to overwrite this class https://github.com/NativeScript/NativeScript/blob/main/packages/core/ui/slider/index.android.ts#L51 the isUserInteractionEnabled property
I think it would be best to overwrite this class https://github.com/NativeScript/NativeScript/blob/main/packages/core/ui/slider/index.android.ts#L51 the isUserInteractionEnabled property
It's a problem that actually affects a dozen of android widgets. ListView is one of them. :/
Issue Description
On Android using Angular it is not possible to disable a Slider with isUserInteractionEnabled='false'
Reproduction
No response
Relevant log output (if applicable)
No response
Environment
Dependencies
Please accept these terms