java.lang.Object | ||
↳ | com.caverock.androidsvg.SVGExternalFileResolver | |
↳ | com.caverock.androidsvg.SimpleAssetResolver |
A sample implementation of SVGExternalFileResolver
that retrieves files from
an application's "assets" folder.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SimpleAssetResolver(AssetManager assetManager) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
isFormatSupported(String mimeType)
Returns true when passed the MIME types for SVG, JPEG, PNG or any of the
other bitmap image formats supported by Android's BitmapFactory class.
| ||||||||||
Typeface |
resolveFont(String fontFamily, int fontWeight, String fontStyle)
Attempt to find the specified font in the "assets" folder and return a Typeface object.
| ||||||||||
Bitmap |
resolveImage(String filename)
Attempt to find the specified image file in the "assets" folder and return a decoded Bitmap.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.caverock.androidsvg.SVGExternalFileResolver
| |||||||||||
From class
java.lang.Object
|
Returns true when passed the MIME types for SVG, JPEG, PNG or any of the other bitmap image formats supported by Android's BitmapFactory class.
mimeType | A MIME type (such as "image/jpeg"). |
---|
resolveImage()
implementation supports this file format.
Attempt to find the specified font in the "assets" folder and return a Typeface object. For the font name "Foo", first the file "Foo.ttf" will be tried and if that fails, "Foo.otf".
fontFamily | Font family as specified in a font-family style attribute. |
---|---|
fontWeight | Font weight as specified in a font-weight style attribute. |
fontStyle | Font style as specified in a font-style style attribute. |
Attempt to find the specified image file in the "assets" folder and return a decoded Bitmap.
filename | the filename as provided in the xlink:href attribute of a <image> element. |
---|