briefcase icon indicating copy to clipboard operation
briefcase copied to clipboard

Add ability to override resources in application

Open Pairman opened this issue 8 months ago • 1 comments

What is the problem or limitation you are having?

Is there any way to add or override resource files?

This is extremely useful when managing resources. For example, I'd like my ic_launcher_background be defined in an xml, to support gradient colors.

Describe the solution you'd like

Either under the android specific section in pyproject.toml, or by modifying briefcase.toml.

For example, a project can store the overrides under a directory, with the exact same hierarchy.

And in pyproject.toml, user specifies this dir to override the resiurces under [tool.briefcase.app.xdcheckin.android].

The packaging process will first apply the common res dir in the project's src/<name>/app/res, then apply the overrides directly to the generated template's res dir.

Describe alternatives you've considered

Modifying res in the result .apk can also work, but it's not convenient and universal for every briefcase projects.

Additional context

Thanks.

Pairman avatar Jun 11 '24 04:06 Pairman