Binding adapter AK(android.widget.EditText, android.view.View.OnFocusChangeListener)
already exists for onFocus! Overriding
Java_File_1#bindFocusChange with Java_File_2#bindFocusChange
我在上面收到此警告,猜测与edittext相关的内容。但它在java文件中显示警告。下面是两个 java 类文件中的两个 #bindFocusChange 方法。
Java_File_1:
@BindingAdapter("onFocus")
public static void bindFocusChange(EditText editText, View.OnFocusChangeListener onFocusChangeListener) {
if (editText.getOnFocusChangeListener() == null) {
editText.setOnFocusChangeListener(onFocusChangeListener);
}
}
Java_File_2:
@BindingAdapter("onFocus")
public static void bindFocusChange(EditText editText, View.OnFocusChangeListener
onFocusChangeListener) {
if (editText.getOnFocusChangeListener() == null) {
editText.setOnFocusChangeListener(onFocusChangeListener);
}
}
PS:警告是 Android Gradle 插件警告。不知道这是否可以帮助任何人。但只是说