[Spec] Use Android Fast Renderers by Default #5724
Comments
Should there be a warning in the console for those who have added the following line?
If fast renderers are used by default, there is no need for the above flag. |
One additional thing that should be done here... when we do this, make the fast renderers public and unseal them so that people can inherit from the fast renderers. |
@dansiegel ;)
|
We designed the flags to just no-op when they're no longer necessary. It should have no adverse affects on your application to continue to have it there. If we add a console warning, you'll definitely have a "larger" (read: still very small) performance hit. But if this is something that is strongly desired by the community, we'll consider it for sure. Thanks! |
* [Android] Unseal FastRenderers * [Android] Flip experimental flag to legacy flag * Flip flag for testing both renderers & set up custom renderers for testing * Undo build arg change This reverts commit 8447fec. * Fix whitespace * restore workaround for xamarin#2520 * Only use workaround for fast renderers (crashes legacy) fixes xamarin#5724
Use Android Fast Renderers by Default
Android Fast Renderers were introduced in #845 in version 2.3.5. These removed an extra
ViewGroup
wrapper around the basic controls, which made view rendering faster by reducing the number of views inflated.These controls have a Fast Renderer that you must currently opt in to use via experimental flag:
Button
Image
Label
Frame
Since these new renderers were not identical to the legacy renderers, they were put under an experimental flag to prevent unexpected behavior changes in existing applications.
These renderers have now been tested heavily for almost two years, and it is time to make them the default renderers on Android!
From this point forward, all applications targeting
FormsAppCompatActivity
will use the Fast Renderers by default. We will also no longer plan to add new features to the legacy renderers.As part of this change, we will also be un-
seal
ing the Fast Renderers and ensuring that all extension points are properly open to allow developers to create custom renderers.Backward Compatibility
You can override the new default by:
View.Visual
, such asMaterial
. Note that these are already different renderers that are also (mostly) following the Fast Renderer pattern.Forms.SetFlags("UseLegacyRenderers")
flag in yourMainActivity
.The text was updated successfully, but these errors were encountered: