I am using the svg-android library to load and display SVG images:
ImageView iv = (ImageView)findViewById(R.id.imgLoginLogo);
// Set the background color to white
iv.setBackgroundColor(Color.WHITE);
// Parse the SVG file from the resource
SVG svg = SVGParser.getSVGFromResource(getResources(), R.raw.android);
// Get a drawable from the parsed SVG and set it as the drawable for the ImageView
Drawable d = svg.createPictureDrawable();
iv.setImageDrawable(d);
Problem is the drawable I get has zero dimensions, so it is not visible.
What is wrong here ?
Thanks
Shimon