title: InflateException with FloatingActionButton from Official Design Library
body: <p>I am getting a bug using the official <code>FloatingActionButton</code> from Google's support design library.</p>
  
  <p>Here is my LogCat. </p>
  
  <pre><code>android.view.InflateException: Binary XML file line #34: Error inflating class android.support.design.widget.FloatingActionButton
  at android.view.LayoutInflater.createView(LayoutInflater.java:633)
  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
  at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
  at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:655)
  at android.view.LayoutInflater.inflate(Unknown Source)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
  at ---.---.com.---.SubCategoryFragment.onCreateView(SubCategoryFragment.java:47)
  at android.support.v4.app.Fragment.performCreateView(Fragment.java:1789)
  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:955)
  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1138)
  at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:740)
  at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1501)
  at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:458)
  at android.os.Handler.handleCallback(Handler.java:739)
  at android.os.Handler.dispatchMessage(Handler.java:95)
  at android.os.Looper.loop(Looper.java:135)
  at android.app.ActivityThread.main(ActivityThread.java:5221)
  at java.lang.reflect.Method.invoke(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:372)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
  at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:117)
  Caused by: java.lang.reflect.InvocationTargetException
  at java.lang.reflect.Constructor.newInstance(Native Method)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
  at android.view.LayoutInflater.createView(LayoutInflater.java:607)
  ... 24 more
  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable()' on a null object reference
  at android.graphics.drawable.LayerDrawable$ChildDrawable.&lt;init&gt;(LayerDrawable.java:968)
  at android.graphics.drawable.LayerDrawable$LayerState.&lt;init&gt;(LayerDrawable.java:1014)
  at android.graphics.drawable.RippleDrawable$RippleState.&lt;init&gt;(RippleDrawable.java:910)
  at android.graphics.drawable.RippleDrawable.createConstantState(RippleDrawable.java:901)
  at android.graphics.drawable.RippleDrawable.createConstantState(RippleDrawable.java:90)
  at android.graphics.drawable.LayerDrawable.mutate(LayerDrawable.java:932)
  at android.graphics.drawable.RippleDrawable.mutate(RippleDrawable.java:891)
  at android.view.View.applyBackgroundTint(View.java:16324)
  at android.view.View.setBackgroundDrawable(View.java:16193)
  at android.support.design.widget.FloatingActionButton.access$201(FloatingActionButton.java:56)
  at android.support.design.widget.FloatingActionButton$1.setBackgroundDrawable(FloatingActionButton.java:118)
  at android.support.design.widget.FloatingActionButtonLollipop.setBackgroundDrawable(FloatingActionButtonLollipop.java:75)
  at android.support.design.widget.FloatingActionButton.&lt;init&gt;(FloatingActionButton.java:131)
  at android.support.design.widget.FloatingActionButton.&lt;init&gt;(FloatingActionButton.java:79)
  ... 27 more
  </code></pre>
  
  <p>The only line that points to my app is where it inflates the <code>xml</code> file, and the line in that file which is my <code>FloatingActionButton</code>.</p>
  
  <pre><code>   &lt;android.support.design.widget.FloatingActionButton
          android:id="@+id/myFABSubCat"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignParentEnd="true"
          android:layout_alignParentRight="true"
          android:layout_margin="16dp"
          android:backgroundTint="@color/accent"
          android:src="@drawable/add_icon"
          app:borderWidth="0dp"
          app:elevation="4sp" /&gt;
  </code></pre>
  
  <p>Extra info:</p>
  
  <p>Here is my app theme:</p>
  
  <pre><code>&lt;resources&gt;
  
      &lt;!-- Base application theme. --&gt;
      &lt;style name="MBTIAppTheme" parent="Theme.AppCompat.Light.NoActionBar"&gt;
          &lt;item name="colorPrimary"&gt;@color/primary&lt;/item&gt;
          &lt;item name="colorPrimaryDark"&gt;@color/primaryDark&lt;/item&gt;
          &lt;item name="colorAccent"&gt;@color/accent&lt;/item&gt;
          &lt;item name="android:windowContentOverlay"&gt;@null&lt;/item&gt;
      &lt;/style&gt;
  
      &lt;style name="ThemeNoActionBar" parent="MBTIAppTheme"&gt;
          &lt;item name="windowActionBar"&gt;false&lt;/item&gt;
      &lt;/style&gt;
  
  &lt;/resources&gt;
  </code></pre>
  
  <p>Yes, I am using an <code>AppCompatActivity</code>.</p>
  
  <p>I noticed I am using an older version of appcompat:</p>
  
  <pre><code>com.android.support:appcompat-v7:22.1.1
  </code></pre>
  
  <p>This seems to be up to date:</p>
  
  <pre><code>compile 'com.android.support:design:22.2.0'
  </code></pre>
  
  <p>Also,</p>
  
  <pre><code>minSdkVersion 16
  targetSdkVersion 22
  </code></pre>
  
  <p>Now, I do set the Visibility to <code>GONE</code> in some case for my FAB, but this is after it inflates so that can't be the issue.</p>
  
  <p>Now, this works with my 5.1 device, but the users who have issues have 5.0.</p>
  
  <p>Is this a known bug or maybe I am doing something wrong?</p>