am de373c43: am 1ef42f18: am 29611577: Merge "FAB: Fix NPE with XML attribute, set clickable by default"
* commit 'de373c43e108bc24b46c947c7a4da26774cdb874':
FAB: Fix NPE with XML attribute, set clickable by default
diff --git a/design/src/android/support/design/widget/FloatingActionButton.java b/design/src/android/support/design/widget/FloatingActionButton.java
index caa3509..742bfa1 100644
--- a/design/src/android/support/design/widget/FloatingActionButton.java
+++ b/design/src/android/support/design/widget/FloatingActionButton.java
@@ -122,6 +122,8 @@
mBackgroundTintMode, mRippleColor);
mImpl.setElevation(elevation);
mImpl.setPressedTranslationZ(pressedTranslationZ);
+
+ setClickable(true);
}
@Override
@@ -206,7 +208,10 @@
@Override
public void setBackgroundDrawable(Drawable background) {
- mImpl.setBackgroundDrawable(background, mBackgroundTint, mBackgroundTintMode, mRippleColor);
+ if (mImpl != null) {
+ mImpl.setBackgroundDrawable(
+ background, mBackgroundTint, mBackgroundTintMode, mRippleColor);
+ }
}
final int getSizeDimension() {