When I try to add a custom view to the DSL, I used...
# anko
t
When I try to add a custom view to the DSL, I used the inline functions here specified here: https://github.com/Kotlin/anko/blob/master/doc/ADVANCED.md#extending-anko
Copy code
inline fun ViewManager.simpleTextField(textInputId: Int, hintText: Int, editTextInputType: Int) = simpleTextField(textInputId, hintText, editTextInputType) {}
inline fun ViewManager.simpleTextField(textInputId: Int, hintText: Int, editTextInputType: Int, init:SimpleTextFieldUI.() -> Unit) = ankoView({ SimpleTextFieldUI(textInputId, hintText, editTextInputType) }, init)
But I'm getting an error saying
Type parameter bound for T in inline fun <T : View> ViewManager.ankoView(factory: (Context) -> T, init: T.() -> Unit): T is not satisfied: inferred type SimpleTextFieldUI is not a subtype of View