Skip to content Skip to sidebar Skip to footer

Mvvmcross Android Linking Issue On Visibility Converter

I know there are linking issues with Android and I know about using the LinkerPleaseInclude. However I am not sure what to put into the LinkerPleaseInclude.cs file for the problem

Solution 1:

The problem was that when building a release version of an Android application you sometimes find that some of the behaviour does not work. This is due to the way it links the program. I believed it optimises in a way that removes code that it thinks it is not using. To fix it in an MvvmCross based app you have to add the calls to the code that you think it has optimised away. This is done by using the LinkerPleaseInclude.cs file and adding calls to the "missing" code. In this case visibility on a ProgressBar control was not working. I had tried adding code to the LinkerPleaseInclude.cs file but it was not working. I found the solution and added as an answer.

I put the following code into the LinkerPleaseInclude.cs. I think it works because it uses both the setter and getter

publicvoidInclude(ProgressBar ProgressBar){
   progressBar.Visibility = !progressBar.Visibility;
}

Post a Comment for "Mvvmcross Android Linking Issue On Visibility Converter"