BindingAdapter with lambda as argument

Issue With Android databinding, I can do the following: <View android:layout_width=”match_parent” android:layout_height=”wrap_content” android:onClick=”@{() -> viewModel.onClick()}” /> My ViewModel does not have to implement OnClickListener, but just have a method: public void onClick() { } What it passes to the onClick

Continue reading

android: data binding error: cannot find symbol class

Issue I am getting started for using DataBinding feature. I am facing problem with it. Error:(21, 9) error: cannot find symbol class ContactListActivityBinding build.gradle(Module: app) apply plugin: ‘com.android.application’ android { compileSdkVersion 23 buildToolsVersion “23.0.2” defaultConfig { applicationId “com.letsnurture.ln_202.databindingdemo” minSdkVersion 15

Continue reading

NoSuchMethodError: No interface method getOrDefault(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; in class Ljava/util/Map;

Issue I’ve got the crash on Meizu device with Android 5.0. This crash doesn’t appear on most of the devices. The error is: java.lang.NoSuchMethodError: No interface method getOrDefault(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; in class Ljava/util/Map; or its super classes (declaration of ‘java.util.Map’ appears in

Continue reading