public class

SVGImageView

extends ImageView
java.lang.Object
   ↳ android.view.View
     ↳ android.widget.ImageView
       ↳ com.caverock.androidsvg.SVGImageView

Class Overview

SVGImageView is a View widget that allows users to include SVG images in their layouts. It is implemented as a thin layer over android.widget.ImageView.

In its present form it has one significant limitation. It uses the renderToPicture() method. That means that SVG documents that use <mask> elements will not display correctly.

Summary

[Expand]
Inherited Constants
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
SVGImageView(Context context)
SVGImageView(Context context, AttributeSet attrs)
SVGImageView(Context context, AttributeSet attrs, int defStyle)
Public Methods
void setImageAsset(String filename)
Load an SVG image from the given asset filename.
void setImageResource(int resourceId)
Load an SVG image from the given resource id.
void setImageURI(Uri uri)
Load an SVG image from the given resource URI.
[Expand]
Inherited Methods
From class android.widget.ImageView
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public SVGImageView (Context context)

public SVGImageView (Context context, AttributeSet attrs)

public SVGImageView (Context context, AttributeSet attrs, int defStyle)

Public Methods

public void setImageAsset (String filename)

Load an SVG image from the given asset filename.

public void setImageResource (int resourceId)

Load an SVG image from the given resource id.

public void setImageURI (Uri uri)

Load an SVG image from the given resource URI.