-
Notifications
You must be signed in to change notification settings - Fork 564
Open
Labels
needs-triageIssues that need to be assigned.Issues that need to be assigned.
Description
Description
Following the android documentation about Fragments I tried to use the AppCompatActivity constructor-overload that takes a layout-id instead of calling SetContentView like I used to.
public sealed class MainActivity() : AppCompatActivity(Resource.Layout.activity_main)Problem is: The base constructor never get's called (from .NET) as the RCW is already created when activating the activity.
I would argue that calling a base-constructor of an activatable class with arguments should at least give some build-time warning. Also it would be nice if integer constants would be supported when generating the constructor of the RCW as I cannot use the ExportAttribute with generated constants (See below).
Did you find any workaround?
No.
I tried to use the ExportAttribute like so:
[method: Export(SuperArgumentsString = $"{Resource.Layout.activity_main}")]
public sealed class MainActivity() : AppCompatActivity(Resource.Layout.activity_main)but c# only allows strings in interpolated string constants (not integers).
Metadata
Metadata
Assignees
Labels
needs-triageIssues that need to be assigned.Issues that need to be assigned.