* AndroidX API updates
* - merge fixes
* - 2017 fixes
* - extra lines added to cs proj files
* - menu element fix
* - androidx bump
* - cleanup
* - remove extra using
* - missed one
* - fix material version
* - one more TapOverflowMenuButton
* Android fonts now work with shorter notation
"Lobster-Regular.ttf#Lobster-Regular" now works as just "Lobster-Regular"
* iOS Sample page now loads
* UWP now uses simple font names
* Fixed UWP Font loading!
UWP now supports `PTM55FT#PTMono`
* Added UWP Font Caching!
* iOS now supports Custom fonts like `PTM55FT#PTMono`
* Android now supports all the font formats!
* Add new styles to show how they can work
* Android fonts now work with shorter notation
"Lobster-Regular.ttf#Lobster-Regular" now works as just "Lobster-Regular"
* iOS Sample page now loads
* UWP now uses simple font names
* Fixed UWP Font loading!
UWP now supports `PTM55FT#PTMono`
* Added UWP Font Caching!
* iOS now supports Custom fonts like `PTM55FT#PTMono`
* Android now supports all the font formats!
* Add new styles to show how they can work
* Fixed iOS Font Loading
* iOS now can load embedded resources!
* Android can now load from embedded resources
* Moved FontFile parsing to Xamarin.Forms.Core, Added Unit Tests!
* IEmeddedFont now returns the path on success.
* removed unused code
* Embedded fonts now load in UWP
* Fixed crash in fonts
* changed the String.Contains to a string, instead of char to make VS windows happy
* netStandard1.0 won't let me have nice things
* grammer fixes :D
* smidgen of cleanup
* fix merge issues
* Update Registrar.cs
Context: https://devblogs.microsoft.com/xamarin/optimize-xamarin-android-builds/
The goal here is to improve the developer loop on Android when working
on Xamarin.Forms using a few settings for `Debug` builds:
* Enable Fast Deployment
* `AndroidLinkMode=None`
* `DebugType=portable`
* `ProduceReferenceAssembly=True` in netstandard projects
After these changes changes:
Before:
Time Elapsed 00:00:37.15
After:
Time Elapsed 00:00:15.79
This was just running:
msbuild Xamarin.Forms.ControlGallery.Android\Xamarin.Forms.ControlGallery.Android.csproj
I was using VS 2019 16.2 on Windows, changing a XAML file.
So one thing to note is that `AndroidLinkMode=Full` was used the
UITests running on CI are using `Debug` builds. I used a `Condition`
to check the `$(CI)` variable, so UITests will be unaffected.
Other cleanup:
* Explicitly set both `AndroidUseSharedRuntime` and
`EmbedAssembliesIntoApk`
* `AndroidSupportedAbis` only needs to be specified for `Release`
builds. `Debug` builds will detect the attached device/emulator and
use the appropriate ABI.
* `JavaMaximumHeapSize` can be removed, it defaults to `1G`.
* Removed other weird/old/empty MSBuild properties.
Rely on `Directory.Build.props`:
* `DebugType` is already defined, so we can remove these.
* `ProduceReferenceAssembly` can be set if
`UsingMicrosoftNETSdk=True`, I could not check `TargetFramework` at
this stage, evaluation, since it was blank. This sets the value for
all netstandard/SDK-style projects.
~~ [ControlGallery] assembly-level [Preserve] ~~
Context: d7a9c85774/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla25234.cs (L13)
There was also some concern where needing `[Preserve]` attributes
would only be found when the CI is running. You don't want to wait 3+
hours to know if you made a small mistake.
This adds `[assembly:Preserve]` to the ControlGallery project, so this
should be less likely to occur in the future.
* [Build] Remove submodule
* [Build] Use GitInfo to set Assembly metadata
* [Build] Remove extra prop
* [Build] Update version
* [Build] Update versions to be consistent with existing Build.Tasks
* [Build] Update build number
* [Build] make sure build tasks gets info
* [Build] Add assembly info unit test
* [Test] Refactor test for gitinfo on vsts
Context: https://github.com/xamarin/xamarin-android/issues/2982
The Blank Xamarin.Forms app template in VS 2019 takes longer to build
than in VS 2017. A little research is showing that this is due to use
of the 28.x support libraries... For example, the build includes ~20
*more* jar files in the template from 2019 than 2017. The
`_CompileDex` step alone goes from ~15.2s to ~18.2s.
This lead me down the road of investigating if we can remove any
support libraries by default in Xamarin.Forms apps. I am also seeing
if there is more we can do in Xamarin.Android for this problem, in
general.
It looks like we can remove:
* Xamarin.Android.Support.v7.MediaRouter
* Xamarin.Android.Support.Media.Compat
Neither of these appear to be used, but have been listed as
dependencies of Xamarin.Forms for a long time.
~~ Results ~~
I made these changes, then did a `Debug` build of
`Xamarin.Forms.ControlGallery.Android.csproj` for comparison.
Comparing dex file sizes (in bytes):
Before:
3428092 classes.dex
3265616 classes2.dex
6693708 total
After:
4938000 classes.dex
1098772 classes2.dex
6036772 total
This looks like it could potentially save ~600KB of compiled dex code
on every Xamarin.Forms app.
Comparing methods:
Before:
classes.dex 11,492 methods
classes2.dex 19,451 methods
total 30,943 methods
After:
classes.dex 22,171 methods
classes2.dex 7,635 methods
total 29,806 methods
~1,137 methods removed, which should help with the dex limit.
Comparing APK sizes (in bytes):
Before:
26442597 AndroidControlGallery.AndroidControlGallery-Signed.apk
After:
25741701 AndroidControlGallery.AndroidControlGallery-Signed.apk
~700KB smaller APK, due to less .NET assemblies & dex code.
Comparing build time (this was using dx):
Before:
19785 ms CompileToDalvik 1 calls
After:
18532 ms CompileToDalvik 1 calls
Looks like it saved over a second of build time for this project.
Seems like an "easy win", let's do this!
* [Android] move renderers to separate nuget
* additional android dependency
* rebase with material changes
* add android to material check
* simplify assembly info
* - add context to Init for future cases
* [ios] extract ios material out to its own project
* [core] fix platform messaging
* add material to other test projects
* update MaterialComponents on all test projects
* remove material from platform
* yml updates
* nuspec
* add iOS description
* language
* add dummy file so package installs into netstandard/android
* Add Target Framework checks
* Use the auto-generated constants
* [Visual] Work on the Material Frame
* Improving the code for the sample
* Added a controller to help with frames that have additional padding
- Android MaterialCardView does not use the default padding to determine where the content starts, rather it uses the content padding of the view because there is a border that does not affect the content
* [Visual] Added a few extra checks on Android to reduce unnecessary interop
* [Visual] A few more frame changes and some button tweaks
* [Visual] use the themers on iOS and save default properties
* [Visual] Add placeholders for themer and cache defaults
* [Visual] Added the material slider for iOS
- Android does not have a custom control, so uses the existing renderer
* [enhancements] Move from duplicate LoadImageAsync code to GetNativeImageAsync
* [visual] Updated the controls to use the new iOS bits
* [visual] some fixes for material components
* [visual] Added hacks for material alerts
* [visual] removing the alert changes for the main branch
* [visual] Update the MaterialComponents NuGet
* [visual] Rework the theming/customization of Material controls on iOS
* [visual] fix the places where the user colors were being changed
* [visual] Improve the ColorStateList management for Android
* [visual] Re-implemented the Android ProgressBar as a fast, material renderer
* Material Entry
* [visual] Add Android ActivityIndicator
* filter out material layouts for 8.1
* remove folder
* fix __ANDROID_28__
* MaterialContextThemeWrapper
* [visual] remove the `IFrameController` interface
* [visual] reverting the changes to the Frame layout
* [visual] reverting whitespace
* [visual] make sure to raise both property changed
* formatting changes
* fixing colors on android to match with ios themes
* Update Xamarin.Forms.Platform.Android/Material/MaterialButtonRenderer.cs
Co-Authored-By: mattleibow <mattleibow@live.com>
* fix sizing of entry with infinite width size request
* update to release 28 of support
* Update Xamarin.Forms.Platform.Android/Resources/values/styles.xml
Co-Authored-By: PureWeen <shane94@hotmail.com>
* Update Xamarin.Forms.Platform.Android/Resources/values/styles.xml
Co-Authored-By: PureWeen <shane94@hotmail.com>
* PR Comment changes
* [Shell] The glorious Shell
* set the flag for the test
* remove the FastRenderer flag
* [Android] If we were disposed earlier Element can be null and Control was disposed
* [Controls] Seems part of #2520 was solved so we don't need this
* [iOS] Fix NRE on the ScrollviewTracker
* add missing constructor for RenderWith
* [Core] propagate visual/flow through shell
* use interlock increment
* hide IDataTemplateController
* [Android] Fix TableViewModelRenderer dispose
* [Core] propagate visual/flow direction through shell hierarchy
* [Android-Gallery] removed some left in settings changes that effect UI Tests
* [iOS,Droid,Core] Code formatting
* [iOS,Core] Last minute style refactoring
* Visual
* add progress bar and fix ui tint color
* Progress Bar Updates
* ios padding fixes
* padding fix and button image positioning fixes
* added button themes
* disable tint and open up material android button
* change image to bank
* add overrides for Material Frame Renderer
* remove commented out code
* change back to Full linker
* applying comment fixes
* change comparison
* Move the first few projects over to PackageReference
* Move the first few projects over to PackageReference
* Moved the remainder of the projects to PackageReference
* Copy the nunit test adapters for the test apps
* Update the unit tests version of json.net
* Don't use relative paths
* Make sure to also copy sub folders
* Remove the trailing slash
* Keep the directory structure
Currently, on the first build of a "Hello World" Xamarin.Forms app,
you will see this in the build log:
ConvertDebuggingFiles
Parameters
Files
C:\Users\myuser\.nuget\packages\xamarin.forms\3.1.0.697729\lib\MonoAndroid10\FormsViewGroup.pdb
C:\Users\myuser\.nuget\packages\xamarin.forms\3.1.0.697729\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.pdb
OutputItems
_ConvertedDebuggingFiles
C:\Users\myuser\.nuget\packages\xamarin.forms\3.1.0.697729\lib\MonoAndroid10\FormsViewGroup.dll
C:\Users\myuser\.nuget\packages\xamarin.forms\3.1.0.697729\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
The logging is a little weird here, but this `ConvertDebuggingFiles`
MSBuild task takes about 100ms on my machine.
What is it doing?
The Mono debugger can support two types of debugging files:
- `mdb` files
- "portable" `pdb` files
If Xamarin.Android's build finds a "non-portable" `pdb` file, we have
to run it through this task to convert to an `mdb` file... This gives
us proper stacktraces for `FormsViewGroup.dll` and
`Xamarin.Forms.Platform.Android.dll`.
You can change the type of debugging symbols in your project with the
`DebugType` setting, which has these options:
- Blank or `None`: don't generate symbols. (Although Xamarin.Android
has funny behavior here, see:
https://github.com/xamarin/xamarin-android/issues/2282)
- `Full` generates an `mdb` file, this is a Windows-proprietary format
for debug builds
- `PdbOnly` generates a "non-portable" `pdb` file, a
Windows-proprietary format for release builds
- `Portable` generates a "portable" pdb file, which is the new
standard that works for debug and release builds. New SDK-style
MSBuild projects use this option by default.
These values are not case sensitive, I have mostly seen them lower
case in newer projects.
So what does Xamarin.Forms need to do?
Use `<DebugType>portable</DebugType>` in any Android class library or
app project. Other platforms, this is optional, not as much benefit. I
have heard that `DebugType=portable` might cause a problem on UWP.
* Xamarin.Forms will ship "portable" `pdbs` in its NuGet package for
`FormsViewGroup.dll` and `Xamarin.Forms.*.Android.dll`. Developers
won't pay the 100ms on initial build.
* Initial build times for `Xamarin.Forms.sln` will be slightly better
for development, although I didn't measure the difference here.
* Disable AndroidUseLatestPlatformSdk in VS so VS stops auto-updating Android projects;
Remove XF.targets imports from projects which don't need it;
Make XF.targets imports conditional on existence of XFBT DLL in VS to avoid errors
* More consistent check for VS
* Apply nicer VS check logic to Xamarin.Forms.Xaml.UnitTests.csproj
* Fix missing "'"
* Re-add XF.targets imports to PagesGallery native projects