-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Create Pieces #241
Comments
I've encountered same error, but i'm solved it. Seeing BoomMenuButton.java, createPieces() is called when view's onLayout(activity's onResume() phase). Maybe, When view's onLayout is started and BoomMenuButton isn't initiailzed(not set builder), this exception is thrown. Solution is do initializing boomMenuButton before starting view's onLayout phase. |
But how? |
I don't know your code. But I think you maybe do lazy-initializing about boommenu in adapter. View inside adapter is also has own lifecycle. In getView() of Adapter, do init boommenu. |
Nam.. I initialize boommenu in ViewHolder Class and inside onBind i use boom menu. |
protected static class CardapioVH extends RecyclerView.ViewHolder {
|
BoomMenu.setPiecePlaceEnum(PiecePlaceEnum.HAM_2);
|
Try initialize boommenu in CardapioVH's constructor with dummy builders. |
solve it? |
I'm sorry to hear that... Could you move your initializing codes(addBuilder) to ViewHolder's Constructor? |
Sorry for late. but add builder, create menu dynamic inside adapter onbind with text and values.. how can do that |
not solve yet, someone can help me ? |
public ComandasVH onCreateViewHolder(@nonnull ViewGroup parent, int viewType) here? |
Please someone can help me ?
Fatal Exception: java.lang.IndexOutOfBoundsException
Index: 0, Size: 0
java.util.ArrayList.get (ArrayList.java:437)
com.nightonke.boommenu.BoomMenuButton.createPieces (BoomMenuButton.java:419)
com.nightonke.boommenu.BoomMenuButton.doLayoutJobs (BoomMenuButton.java:401)
com.nightonke.boommenu.BoomMenuButton.access$1600 (BoomMenuButton.java:66)
com.nightonke.boommenu.BoomMenuButton$7.run (BoomMenuButton.java:1016)
android.os.Handler.handleCallback (Handler.java:883)
The text was updated successfully, but these errors were encountered: