usefulness / easylauncher-gradle-plugin

Add a different ribbon to each of your Android app variants using this gradle plugin. Of course, configure it as you will

Home Page:https://medium.com/@cycki/ribbonize-your-android-application-laucher-icon-again-c52e08d58172?source=friends_link&sk=4747a61844ce085a648d2116780ec4d3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: labelling different activities

yschimke opened this issue · comments

Can you label the icon with the activity name? For a library with a few sample activities for testing different things, it would be great to be able to label each one distinctly without generating a new icon for each.

Hey 👋
I'm not sure if that's feasible 🤔 Or at least, I don't see a way to achieve such effect with current plugin capabilities. It feels like the plugin works on a "different level", it plugs into the build process to generate icons for different build variants. In the case of multiple activities, they all will use a single build variant. The fact of using different build variants is crucial, as the core principal how this plugin works is it provides "more specific" resource than the default one. (given there is an icon defined as main/res/xxx.webp resource, the plugin generates new resource under debug/res/xxx.webp which then is picked by AGP).
In your case - it's not possible to rely on the described behaviour as all activities use the same build variant. To make your use case work - in generated code you'd have to either override AndroidManifest entries (I don't know if that's possible) or modify source files to point at a generated icon.

tl;dr I don't even know if that's feasible - it'd have to rely on a completely different mechanism than what this plugin currently does, so it either can't be done or can't be easily integrated with the plugin.

Just out of curiosity: how many activities do you have?

Only 3 - so easy to fix one off. But more that as I'm not an icon designer, just being able to label them is way more useful for the test activities.

Thanks, thought it worth asking.