13

Are there any vector drawing applications that generate native code for both iOS and Android? I'd like a tool for making UI Controls and Buttons for both iOS and Android (in Xamarin). I can make great dynamic objects with PaintCode for iOS, but then for the Android version I'd have to recreate it with some other tool for Android so I'm basically doing everything twice. I'd love to find a way to create some dynamic controls/buttons that can be used in both Xamarin iOS & Xamarin Android.

LampShade
  • 2,675
  • 5
  • 30
  • 60
  • 2
    I am working on a converter for PaintCode to Android. Would that help? Right now I am only developing it for my company but I would accept beta testers :) – marsbear Sep 28 '15 at 21:17
  • paintcodeapp.com now completely covers Android – Fattie Dec 13 '16 at 13:26
  • @JoeBlow That's exciting! I look forward to using it in the future. Hopefully sooner rather than later. – LampShade Dec 13 '16 at 22:19
  • hi @lampshade it's completely available now - it's incredibly popular. 100% of colleagues use it - everyone uses paintcode - go for it! it's 100% android and ios. enjoy. – Fattie Dec 13 '16 at 22:40
  • @JoeBlow I follow you, thanks. I just mean that I'm not in a position to start using it for Android today. I'm looking forward to using it in 2017 for sure, it's just a matter of when. – LampShade Dec 13 '16 at 22:43

3 Answers3

5

The new version of PaintCode (version 3, as of November 2016) now exports Android compatible code.

Tricertops
  • 8,492
  • 1
  • 39
  • 41
Albuquerque
  • 68
  • 1
  • 5
  • I'm excited! Thanks for sharing the news. – LampShade Nov 08 '16 at 14:20
  • If you want to use it in .NET projects (including Xamarin), you can use my transpiler which converts PaintCode export to multiplatform SkiaSharp code: https://github.com/michaldobrodenka/PaintCode2Skia – Michal Dobrodenka Nov 13 '17 at 18:34
3

One common approach by many organisations (including mine) to deal with cross platform design is to use icon fonts.

The way it works is

  • create a SVG version of your icon/design
  • create a custom font with the svg/vector icon as a unicode character

The advantage:

  • It works with great many platforms, including android, ios, windows phone as well as the web.
  • icons are vector, hence scalable

the disadvantages:

  • icons cannot have gradients
  • icons cannot have multiple colors (can be solved by composing icon into multiple svg components and layering them in code)
Kalyan02
  • 1,416
  • 11
  • 16
  • We are planning on moving to SVGs for our assets in the future. It's certainly the way to go if the application's design supports it. – LampShade Sep 28 '15 at 21:46
2

I have a small project that might solve your problems:

https://github.com/almosr/android-svg-code-render

It is a tool that converts SVG files into Android drawing instructions and saves it as Java source file. Then you can simply call a method from this source with a Canvas parameter and the SVG content will be drawn directly to the Canvas.

It is massively faster than using an SVG file as input at runtime, because it doesn't need to parse the SVG file (which is an XML internally). Also eats up significantly less memory.

There are some limitations and drawbacks, though, so it might or might not be suitable to your needs. Especially interactions cannot be mapped in the output (yet).

racs
  • 3,974
  • 2
  • 23
  • 26