-
Notifications
You must be signed in to change notification settings - Fork 561
Description
Steps to Reproduce
- Enable layout bindings:
<AndroidGenerateLayoutBindings>true</AndroidGenerateLayoutBindings> - Add
xamarin:classesto a layout used by a fragment, with the contents being the fragment's class. - Rebuild, and see it fail.
Expected Behavior
It should compile and give the Fragment the layout binding partial code.
Actual Behavior
Because the generated partial assumes it's an Activity, It includes override void SetContentView which doesn't exist on fragments. I can see why it is built like this (so the layout binding is correctly initialized as the view changes) but It would still be nice to see support for fragments.
Version Information
Microsoft Visual Studio Enterprise 2019
Version 16.2.5
VisualStudio.16.Release/16.2.5+29306.81
Microsoft .NET Framework
Version 4.8.03752
Installed Version: Enterprise
Mono Debugging for Visual Studio 16.2.6 (4cfc7c3)
Support for debugging Mono processes with Visual Studio.
VisualStudio.Mac 1.0
Mac Extension for Visual Studio
Xamarin 16.2.0.95 (d16-2@37df81894)
Xamarin Designer 16.2.0.375 (remotes/origin/d16-2@357d38ef4)
Xamarin Templates 16.3.117 (59a59e8)
Xamarin.Android SDK 9.4.1.1 (d16-2/cec9eb4)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: mono/mono@e6f5369c2d2
Java.Interop: xamarin/java.interop/d16-2@d64ada5
LibZipSharp: grendello/LibZipSharp/d16-2@caa0c74
LibZip: nih-at/libzip@b95cf3f
ProGuard: xamarin/proguard@905836d
SQLite: xamarin/sqlite@8212a2d
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-2@6f6c969
Xamarin.iOS and Xamarin.Mac SDK 12.14.0.114 (c669116)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.