Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.

FloatingActionMenu onFinishInflate not called #473

Open
pomus opened this issue Nov 7, 2019 · 0 comments
Open

FloatingActionMenu onFinishInflate not called #473

pomus opened this issue Nov 7, 2019 · 0 comments

Comments

@pomus
Copy link

pomus commented Nov 7, 2019

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);
}
});
}
...
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant