public class SVGHelper
extends java.lang.Object
mImageView.setImageBitmap( SVGHelper.useContext(this).open(R.raw.star).getBitmap());
File file = new File(Environment.getExternalStorageDirectory() + "/svg/star.svg"); mImageView.setImageBitmap( SVGHelper.noContext().open(file).getBitmap());
mImageView.setImageBitmap( SVGHelper.noContext() .open( "<svg viewBox=\"0 0 100 100\">\n" + " <path d=\"M50,3l12,36h38l-30,22l11,36l-31-21l-31,21l11-36l-30-22h38z\"\n" + " fill=\"#FF0\" stroke=\"#FC0\" stroke-width=\"2\"/>\n" + " </svg>\n") .getBitmap());
Modifier and Type | Class and Description |
---|---|
static class |
SVGHelper.SVGLoadData
Just contexct containing all parameters to be appended.
|
Constructor and Description |
---|
SVGHelper() |
Modifier and Type | Method and Description |
---|---|
static SVGHelper.SVGLoadData |
noContext()
Right way to initiate chain of the SVG processing for case you have no context.
|
static SVGHelper.SVGLoadData |
useContext(Context context)
Right way to initiate chain of the SVG processing.
|
public static SVGHelper.SVGLoadData noContext()
public static SVGHelper.SVGLoadData useContext(Context context)
context
- - Context to operate with resources later.