Android-Animated-Theme-Manager
Android-Animated-Theme-Manager copied to clipboard
Pass layout in activity constructor
⚠️ Is your feature request related to a problem? Please describe
I'm normally using a viewbinding library to simplify the process and prevent memory leaks. ViewBindingPropertyDelegate
The library wants me to pass the layout in the activity constructor as described in the README. This makes it impossible to use with this Theme-Manager.
💡 Describe the solution you'd like
It would be nice if this library were compatible with ViewBindingPropertyDelegate and the best option for this would be if it's possible to pass the layout in the constructor.
🤚 Do you want to develop this feature yourself?
- [ ] Yes
- [x] No
As a workaround the noreflection version can be used with CreateMethod.INFLATE
So, basically, you didn't fix anything. Correct? I just encountered the same problem. I receive this exception:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.samprojre/com.example.samprojre.screens.main.MainActivity}: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
@krutzzz I fixed a bunch of things but it's already 7months ago and I don't know what in detail.
All I know is that in my fork (available on jitpack) it's possible to use the Fragment constructor.
And the activity constructor can't be used however it's possible to use the inflate create method with that it works