The OpenFL library for Haxe contains a number of template files that are used when building a project. You can find them in the assets/templates directory. Using the <template>
element in project.xml, it's possible to provide additional template files to copy to the output directory, on a per-project basis, and without forking OpenFL.
This sample project contains a directory named custom-templates. It is configured in project.xml like this:
<template path="custom-templates"/>
Inside custom-templates, there's a file at android/template/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml. This is an Android resource that defines how the icon looks.
To add an adaptive icon to the generated AndroidManifest.xml file, configure it in project.xml like this:
<config:android>
<application android:icon="@mipmap/ic_launcher"/>
</config:android>
To build and launch the project, run the following command:
openfl test android
Sample created by Josh Tynjala, the author of Feathers UI and core contributor to OpenFL.