You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now each core ViewFactory is final classes, all actions doing in buildView function. It's reason why we should copy-paste core factories for small customization, even when we want change small piece of view building logic.
I suggest to do core factories is open classes with open functions which show each step of building.
Example API of InputViewFactory:
common:
expect open class SystemInputViewFactory
android:
actual open class SystemInputViewFactory {
open fun createEditText(context: Context): EditText
open fun applyBackground(editText: EditText)
open fun applyMargins(editText: EditText)
open fun applyPaddings(editText: EditText)
open fun applyTextStyle(editText: EditText)
open fun applyAlignment(editText: EditText)
open fun bindFormField(editText: EditText, formField: FormField)
open fun bindLabel(editText: EditText, label: LiveData)
open fun bindEnabled(editText: EditText, enabled: LiveData)
open fun bindMaxLines(editText: EditText, maxLines: LiveData)
}
something like on android will be and for ios.
this change allow us to just create subclass of core factory without duplication of all logic and simple change some piece, for example create custom EditText from some library, not just system
The text was updated successfully, but these errors were encountered:
Now each core
ViewFactory
is final classes, all actions doing inbuildView
function. It's reason why we should copy-paste core factories for small customization, even when we want change small piece of view building logic.I suggest to do core factories is
open
classes withopen
functions which show each step of building.Example API of
InputViewFactory
:common:
android:
something like on android will be and for ios.
this change allow us to just create subclass of core factory without duplication of all logic and simple change some piece, for example create custom EditText from some library, not just system
The text was updated successfully, but these errors were encountered: