Open pomus opened 4 years ago
If FloatingActionMenu add from source code (not xml), than onFinishInflate not called So mMenuButton OnClickListener not set
https://developer.android.com/reference/android/view/View.html#onFinishInflate()
I suggest that Move OnClickListenerSetter to createMenuButton() method
createMenuButton() { mMenuButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { toggle(mIsAnimated); } }); }
instead of
createLabels { ... if (fab == mMenuButton) { mMenuButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { toggle(mIsAnimated); } }); } ... }
If FloatingActionMenu add from source code (not xml), than onFinishInflate not called So mMenuButton OnClickListener not set
https://developer.android.com/reference/android/view/View.html#onFinishInflate()
I suggest that Move OnClickListenerSetter to createMenuButton() method
createMenuButton() { mMenuButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { toggle(mIsAnimated); } }); }
instead of
createLabels { ... if (fab == mMenuButton) { mMenuButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { toggle(mIsAnimated); } }); } ... }