I am trying to write a Java application that will generate SVG image based on XML file. The application should also be able to show SVG file. My application should run on Android platform and desktop PCs. I read about Swing + Batik but afaik it will not work on Android. What is the best library to achieve this ?
Android Studio includes a tool called Vector Asset Studio that helps you add material icons and import Scalable Vector Graphic (SVG) and Adobe Photoshop Document (PSD) files into your project as vector drawable resources.
SVG Viewer - SVG Reader SVG Viewer – SVG Reader is a free Android app to view SVG files. This is another simple app with a single focus on viewing the SVG files. While opening the SVG file, it gives users an option to pick the background color. Users can select a background color of their choice and view the SVG file.
To edit an SVG image in Office for Android, tap to select the SVG you want to edit and the Graphics tab should appear on the ribbon. Styles - These are a set of predefined styles you can add to quickly change the look of your SVG file.
EPS and SVG are both vector-based formats. While vector files are excellent for producing crisp graphics, drawings, and designs at any scale, they struggle to reproduce photographs. Raster-based files like JPEG, GIF, TIFF and PNG are better suited to photography.
This article in Code Project deals with the subject. Two approaches are presented:
Both solutions have dependencies on native code library, so you would need JNI.
There is also svg4mobile project, which only uses Java.
per this thread: libsvg ported
libsvg has been ported to android..see thread for details. You need a crystax form of NDK, ie exceptions enabled..build/install doc here at:build-install-doc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With