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
There are Views in Android that only accept some attributes when the view is created and can't be changed after that (e.g. android:textCursorDrawable in EditText). We need a way to pass down these attribute sets into @OnCreateMountContent to allow android widgets to be constructed with them.
There's no "supported" way of doing this. the obtainStyledAttributes() method used to retrieve custom attributes is implemented in ResourcesImpl.java (in AOSP) and it casts the received attribute set to XmlBlock.Parser, which is a package private final class that has hooks into native code. If you were willing to use reflection to hack into these classes and hook into the classloader to do runtime injection inheriting from the classes unlocked by reflection, it would theoretically be possible... but the effort required is staggeringly large
There are Views in Android that only accept some attributes when the view is created and can't be changed after that (e.g.
android:textCursorDrawable
inEditText
). We need a way to pass down these attribute sets into@OnCreateMountContent
to allow android widgets to be constructed with them.Code pointers
https://github.com/facebook/litho/blob/master/litho-core/src/main/java/com/facebook/litho/ComponentLifecycle.java#L414
https://github.com/facebook/litho/blob/master/litho-processor/src/main/java/com/facebook/litho/specmodels/processor/MountSpecModelFactory.java#L104
Point of contact: @emilsjolander
The text was updated successfully, but these errors were encountered: