我正在使用 BindingMethod
here像这样
@BindingMethod(type = InputView.class, attribute = "android:title", method = "setTitle")
但是显示错误
如何使用 BindingMethod
?
最佳答案
当我将@BindingMethod 放入类中时,出现了这个问题。
所以把它放在类之上
@BindingMethods({
@BindingMethod(type = InputView.class, attribute = "app:title", method = "setTitle")
})
public class InputView extends LinearLayout {
...
}
关于android - @BidingMethod 不适用于方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40583738/