Fix FabLayout onClick
mExpanded blocked onClickPrimaryFab and onClickSecondaryFab before. But it should only block onClickSecondaryFab
This commit is contained in:
1 parent
74e10178be
commit
21151a5031
1 file changed
+2
-2
@@ -353,11 +353,11 @@ public class FabLayout extends ViewGroup implements View.OnClickListener {
|
||||
public void onClick(View v) {
|
||||
if (this == v) {
|
||||
setExpanded(false);
|
||||
} else if (mOnClickFabListener != null && mExpanded) {
|
||||
} else if (mOnClickFabListener != null) {
|
||||
int position = indexOfChild(v);
|
||||
if (position == getChildCount() - 1) {
|
||||
mOnClickFabListener.onClickPrimaryFab(this, (FloatingActionButton) v);
|
||||
} else if (position >= 0) {
|
||||
} else if (position >= 0 && mExpanded) {
|
||||
mOnClickFabListener.onClickSecondaryFab(this, (FloatingActionButton) v, position);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user