package com.prateekj.snooper.infra;

import android.databinding.BindingAdapter;
import android.support.v4.view.ViewCompat;
import android.support.v7.widget.RecyclerView;
import android.widget.ListView;

import se.emilsjolander.stickylistheaders.StickyListHeadersAdapter;
import se.emilsjolander.stickylistheaders.StickyListHeadersListView;

public class CustomBindings {

  @BindingAdapter("adapter")
  public static void setAdapter(RecyclerView recyclerView, RecyclerView.Adapter adapter) {
    recyclerView.setAdapter(adapter);
  }

  @BindingAdapter("stickyAdapter")
  public static void setStickyAdapter(StickyListHeadersListView stickyHeadersListView, StickyListHeadersAdapter adapter) {
    stickyHeadersListView.setAdapter(adapter);
  }

  @BindingAdapter("nestingScrollingEnabled")
  public static void setNestingScrollingEnabled(StickyListHeadersListView stickyHeadersListView, boolean enabled) {
    ListView listView = stickyHeadersListView.getWrappedList();
    ViewCompat.setNestedScrollingEnabled(listView, enabled);
  }

  @BindingAdapter("itemDecoration")
  public static void setItemDecoration(RecyclerView recyclerView, RecyclerView.ItemDecoration itemDecoration) {
    recyclerView.addItemDecoration(itemDecoration);
  }
}

@@ -384,16 +384,20 @@
 dapter(%22
+app:
 adapter%22
@@ -390,32 +390,32 @@
 (%22app:adapter%22)%0A
-
   public static 
@@ -551,16 +551,20 @@
 dapter(%22
+app:
 stickyAd
@@ -765,16 +765,20 @@
 dapter(%22
+app:
 nestingS
@@ -1033,32 +1033,32 @@
  enabled);%0A  %7D%0A%0A
-
   @BindingAdapte
@@ -1060,16 +1060,20 @@
 dapter(%22
+app:
 itemDeco

Revert "removing data binding warnings"