Annotation Type CallbackProp


  • @Target({METHOD,FIELD})
    @Retention(CLASS)
    public @interface CallbackProp
    A convenient replacement for ModelProp when the prop represents a callback or listener.

    This is the same as using ModelProp with the options ModelProp.Option.NullOnRecycle and ModelProp.Option.DoNotHash

    This can only be used on setters who's parameter is marked as nullable. The prop will be set to null when the view is recycled to ensure that the listener is not leaked.

    Be aware that since this applies the option ModelProp.Option.DoNotHash changing the value of the listener will not trigger an update to the view.