Instantly share code, notes, and snippets.

View MyViewModel.java
package com.example.cain.mvvmexample;
import android.arch.lifecycle.ViewModel;
import me.tatarka.bindingcollectionadapter2.ItemBinding;
import me.tatarka.bindingcollectionadapter2.collections.DiffObservableList;
// See https://github.com/evant/binding-collection-adapter
public class MyViewModel extends ViewModel {
View NavigationDataBindings.java
package com.example.cain.mvvmexample;
import android.content.Intent;
import android.databinding.BindingAdapter;
import android.databinding.InverseBindingAdapter;
import android.databinding.InverseBindingListener;
import android.support.annotation.Nullable;
import android.view.View;
View AlertDialogBindings.java
package com.example.cain.mvvmexample;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.databinding.BindingAdapter;
import android.databinding.InverseBindingAdapter;
import android.databinding.InverseBindingListener;
import android.support.annotation.Nullable;
View GridLayoutQuirksFixedManager.java
package android.support.v7.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
/**
* Bug fixed version of GridLayoutManager
* Created by SangsooNam on 20/09/15.
* Modified by Cain Wong on 13/11/15: Updated for Recyclerview-v7:22.2.1