Skip to content

Compose: expose painterResource in Xamarin.AndroidX.Compose.UI.Android#1449

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-painterresource-binding-issue
Draft

Compose: expose painterResource in Xamarin.AndroidX.Compose.UI.Android#1449
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-painterresource-binding-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 5, 2026

PainterResources_androidKt bound as an empty wrapper, so painterResource(@DrawableRes Int): Painter was unreachable from C# — leaving the bound Painter/BitmapPainter/ColorPainter types unusable in typical Compose code.

The current binder toolchain already projects this method automatically; the checked-in binding predates that. No metadata transform is needed (an add-node for it would produce a duplicate method, CS0111). The fix is to record the API and ship a new package revision.

Changes

  • PublicAPI/PublicAPI.Unshipped.txt: add PainterResources_androidKt.PainterResource(int, IComposer?, int) -> Painter.
  • config.json: bump Xamarin.AndroidX.Compose.UI.Android 1.11.21.11.2.1 to trigger a rebuild that ships the bound method.

The bound method projects as:

public static Painter PainterResource (int id, IComposer? _composer, int _changed);

Notes

Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix painterResource not bound in Xamarin.AndroidX.Compose.UI.Android Compose: expose painterResource in Xamarin.AndroidX.Compose.UI.Android Jun 5, 2026
Copilot AI requested a review from jonathanpeppers June 5, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compose: painterResource(Int, Composer) not bound in Xamarin.AndroidX.Compose.UI.Android (PainterResources_androidKt wrapper is empty)

2 participants