Anko DSL error
See original GitHub issueWhen using anko DSL the stepper view crashes when inflating the xml.
Error: android.view.InflateException: Binary XML file line #10: Error inflating class com.stepstone.stepper.internal.widget.TabsContainer
How to reproduce:
- Write an extension for the stepper layout
inline fun ViewManager.stepperLayout(theme: Int = 0) = stepperLayout(theme) {}
inline fun ViewManager.stepperLayout(theme: Int = 0, init: StepperLayout.() -> Unit) = ankoView({ StepperLayout(it) }, theme, init)
- In your activity add the DSL code
verticalLayout {
stepperLayout { }
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Dsl processing error (UNKNOWN): Unable to find message ...
When I try to refresh DSL Preview in Activity with layout defined in anko DSL I receive following error: I'm using: IntelliJ IDEA...
Read more >Getting an IDE Error with Anko Layout Preview - Stack Overflow
I'm getting the following IDE error when opening the Anko Layout Preview tool window. The full code of my toy project is below...
Read more >Reviews: Anko Support - IntelliJ IDEA & Android Studio Plugin
After Android Studio updated to 3.3,the anko support 0.10.7-2 can't work. ... Plugin 'Anko DSL Preview' is incompatible with this installation (Android 2.4 ......
Read more >Anko custom widget: editText without displaying error text-kotlin
I believe you want to make your View class accessible from the DSL, and then create it explicitly. Add this code to the...
Read more >Write better Kotlin: Getting Started with Anko for Android
Layouts: provides a Domain Specific Language (DSL) for defining Android ... More code also means more opportunities for error — there's ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, that’s the problem. Now the only way to set it is through XML attributes. Would it be possible to make an additional constructor which takes the ‘type’ instead of AttributeSet object (since this is only used for XML and implementing the interface for regular use would not be efficient), because anko DSL builds the UI programmatically not through XML inflators. I could make a PR for that.
What i ended up doing is having the stepper alone in xml, and include it in my layout DSL