xamarin/Xamarin.Forms

[Bug] Fix RenderWith on Android so it properly links out renderers and native components

Aperta

#7497 aperta il 12 set 2019

 (1 commento) (0 reazioni) (0 assegnatari)C# (1926 fork)batch import
e/6 :clock6:help wantedm/high impact :black_large_square:p/Androidt/bug :bug:up-for-grabs

Metriche repository

Star
 (5644 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Description

The initial intention of the RenderWith attributes were to create a loose coupling from the Xamarin Forms Core components to the Native components. This currently does not work on Android because of two factors

Original RenderWith ticket https://github.com/xamarin/Duplo/pull/2077

Work to be done before going full in on this

We should measure the value of doing this work. For a spike we could just delete all the RenderWith attributes and all the manual registration inside FormsAppCompat. This would effectively give us an idea of what nothing looks like. Once we have a measure of how much nothing differs from everything then we can see if it's worth the effort here.

From the Android team: If adding linking gets shrinks the overall apk by about 1 MB it'd probably be worth it

Testing

We will need to ensure that our UI tests all run with linking turned fully on so that we can catch any linking issues we need to package up with the application

What about iOS?

Currently iOS won't link anything out that inherits from NSObject so it's not (AFAIK) possible to link anything out of iOS

Guida contributor