title: Error inflating class FloatingActionButton
body: <p>I use <a href="https://github.com/makovkastar/FloatingActionButton" rel="nofollow noreferrer">https://github.com/makovkastar/FloatingActionButton</a></p>
  
  <p>Layout:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:fab="http://schemas.android.com/apk/res-auto"
                android:orientation="vertical"
                android:layout_width="match_parent"
                android:layout_height="match_parent"&gt;
  
      &lt;android.support.v7.widget.Toolbar
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:layout_height="?android:attr/actionBarSize"
              /&gt;
  
      &lt;!-- The main content view --&gt;
      &lt;android.support.v4.widget.SwipeRefreshLayout
              android:id="@+id/swipeRefreshLayout"
              android:layout_width="match_parent"
              android:layout_height="match_parent"&gt;
          &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
                       android:layout_width="match_parent"
                       android:layout_height="match_parent"&gt;
              &lt;com.melnykov.fab.ObservableScrollView
                      android:layout_width="fill_parent"
                      android:layout_height="fill_parent"
                      android:id="@+id/obsScrollView"&gt;
                  &lt;LinearLayout
                          android:orientation="vertical"
                          android:layout_width="fill_parent"
                          android:layout_height="fill_parent"
                          android:background="#edeff2"&gt;
                      ...
                  &lt;/LinearLayout&gt;
              &lt;/com.melnykov.fab.ObservableScrollView&gt;
              &lt;com.melnykov.fab.FloatingActionButton
                      android:id="@+id/fab"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="bottom|right"
                      android:layout_margin="16dp"
                      android:src="@drawable/ic_favorite_grey600_48dp"
                      fab:fab_colorNormal="@color/primary"
                      fab:fab_colorPressed="@color/primary_pressed"
                      fab:fab_colorRipple="@color/ripple"/&gt;
          &lt;/FrameLayout&gt;
      &lt;/android.support.v4.widget.SwipeRefreshLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>...
  // ScrollView
  scrollView = (ObservableScrollView) findViewById(R.id.obsScrollView);
  FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
  fab.attachToScrollView(scrollView);
  fab.setColorNormal(getResources().getColor(R.color.primary));
  fab.setColorPressed(getResources().getColor(R.color.primary_pressed));
  ...
  </code></pre>
  
  <p>But I have error when I go to this activity:</p>
  
  <pre><code>01-08 19:44:01.371    2311-2311/com.example.myapp E/AndroidRuntime﹕ FATAL EXCEPTION: main
  Process: com.example.myapp, PID: 2311
  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.example.myapp.VideoActivity}: android.view.InflateException: Binary XML file line #23: Error inflating class com.melnykov.fab.ObservableScrollView
  ...
  Caused by: android.view.InflateException: Binary XML file line #23: Error inflating class com.melnykov.fab.ObservableScrollView
  </code></pre>
  
  <p>Please, tell me, what I do wrong</p>
  
  <p>app compiles without error</p>
  
  <p>Dependencies:</p>
  
  <p><img src="https://i.stack.imgur.com/YoggI.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/B4GY4.png" alt="enter image description here"></p>
  
  <p>When I set attr in XML:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:fab="http://schemas.android.com/apk/res-auto"
                android:orientation="vertical"
                android:layout_width="match_parent"
                android:layout_height="match_parent"&gt;
  ...
  &lt;com.melnykov.fab.FloatingActionButton
                      android:id="@+id/fab"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_gravity="bottom|right"
                      android:layout_margin="16dp"
                      android:src="@drawable/ic_favorite_grey600_48dp"
                      fab:fab_colorNormal="@color/primary"
                      fab:fab_colorPressed="@color/primary_pressed"
                      fab:fab_colorRipple="@color/ripple"/&gt;
  ...
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>Error:(137, -1) android-apt-compiler: [myapp] /Users/fedor/IdeaProjects/myapp/res/layout/video.xml:137: error: No resource identifier found for attribute 'fab_colorNormal' in package 'com.example.myapp'
  Error:(137, -1) android-apt-compiler: [myapp] /Users/fedor/IdeaProjects/myapp/res/layout/video.xml:137: error: No resource identifier found for attribute 'fab_colorPressed' in package 'com.example.myapp'
  Error:(137, -1) android-apt-compiler: [myapp] /Users/fedor/IdeaProjects/myapp/res/layout/video.xml:137: error: No resource identifier found for attribute 'fab_colorRipple' in package 'com.example.myapp'
  </code></pre>
  
  <p>but I imported the library</p>
  
  <p>ObservableScrollView:</p>
  
  <pre><code>package com.melnykov.fab;
  
  
  import android.content.Context;
  import android.util.AttributeSet;
  import android.widget.ScrollView;
  
  public class ObservableScrollView extends ScrollView {
  
      public interface OnScrollChangedListener {
          void onScrollChanged(ScrollView who, int l, int t, int oldl, int oldt);
      }
  
      private OnScrollChangedListener mOnScrollChangedListener;
  
      public ObservableScrollView(Context context) {
          super(context);
      }
  
      public ObservableScrollView(Context context, AttributeSet attrs) {
          super(context, attrs);
      }
  
      public ObservableScrollView(Context context, AttributeSet attrs, int defStyle) {
          super(context, attrs, defStyle);
      }
  
      @Override
      protected void onScrollChanged(int l, int t, int oldl, int oldt) {
          super.onScrollChanged(l, t, oldl, oldt);
          if (mOnScrollChangedListener != null) {
              mOnScrollChangedListener.onScrollChanged(this, l, t, oldl, oldt);
          }
      }
  
      public void setOnScrollChangedListener(OnScrollChangedListener listener) {
          mOnScrollChangedListener = listener;
      }
  }
  </code></pre>