addFloatListener

open override fun addFloatListener(key: String, defaultValue: Float, callback: (Float) -> Unit): Settings.Listener

Adds a listener which will call the supplied callback anytime the value at key changes. A ISettings reference is returned which can be used to halt callbacks by calling ISettings.deactivate. A strong reference should be held to the CommonSettings returned by this method in order to avoid it being garbage-collected.