xamarin / AndroidX

AndroidX bindings for .NET for Android
MIT License
173 stars 42 forks source link

`AddOnChangeListener` or equivalent missing from binding on `Slider`. #785

Closed Zintom closed 9 months ago

Zintom commented 9 months ago

Android application type

.NET Android: net7.0-android, 33.0

Description

I am trying to register a callback for when the value of a Google.Android.Slider changes, in Java I would call addOnChangeListener, but the binding for this in C# does not exist.

Weirdly the binding for ClearOnChangeListeners does exist 🤷‍♂️.

Is there any insight on this?

Steps to Reproduce

Create a new Slider: var slider = new Google.Android.Slider(). Look for relevant AddOnChangeListener method.

Did you find any workaround?

Subscribing to the LayoutChange event allows one to read the Value property when the slider is dragged.

Relevant log output

No response

jpobst commented 9 months ago

Looks like this class is part of the Google Material library. Moving to AndroidX repository.

jpobst commented 9 months ago

Duplicate of https://github.com/xamarin/AndroidX/issues/230.