Is there by any chance someone here who worked on ...
# multiplatform
g
Is there by any chance someone here who worked on creating the KMM plugin for Android Studio? I'm building my own plugin and using extension point "com.android.tools.idea.wizard.template" but can't figure out how to get the icon in the selection screen look good. I use the Thumb class in a TemplateBuilder and it displays the icon, but it's way too big, hideous etc... The KMM template icon looks great so would love to know how it's done. Can't find it in the docs and haven't found the sourcecode of the KMM AS plugin either... Help me obi-wan...anyone? 🥲
k
Author is here 🙂 there is just 512x512 png icon and the implementation:
Copy code
thumb = {
  Thumb { getResource("/META-INF/icon.png") }
}
you can research AS wizards here
g
Thanks! I will have a look later, appreciate it 👍
So for some reason the transparent margin of my SVG image was being ignored, but when using a png 512x512 with transparent sides it looks great. Thanks for the support 🙂
@Konstantin Tskhovrebov could I bother you with one more follow up question? I try to add custom fields the same way as in the example you show, but none of the fields show up. I tried widgets = listOf() and widgets(), adding in something like:
Copy code
val defaultAppNameParameter = stringParameter {
    name = "App name"
    default = "example_app"
    help = "Plugin name as specified in the pubspec.yaml"
    visible = { true }
    constraints = listOf(Constraint.APP_PACKAGE)
}
wrapping it in a TextFieldWidget, but nothing to see.
k
All wizards have the same first uncustomisable step.
g
Also not possible to add extra fields? 🥲
k
As i understand - no. Just take a look at the bundled wizards