Avoid call fab on click listener when not expanded

This commit is contained in:
seven332 committed 2016-05-03 21:35:23 +08:00
1 parent 9590c758fd
commit 2dca63b342
1 file changed
+1 -1
@@ -353,7 +353,7 @@ public class FabLayout extends ViewGroup implements View.OnClickListener {
public void onClick(View v) {
if (this == v) {
setExpanded(false);
} else if (mOnClickFabListener != null) {
} else if (mOnClickFabListener != null && mExpanded) {
int position = indexOfChild(v);
if (position == getChildCount() - 1) {
mOnClickFabListener.onClickPrimaryFab(this, (FloatingActionButton) v);