I have a test app where I have got a ListView with an item which contains two images on it.
As you can see in the API 17 device does not display the play button (SVG image) while the API 10 device does that. How can I fix that?
My layout file:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/background"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:scaleType="centerCrop" />
<ImageView
android:id="@+id/forceground"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" />
</RelativeLayout>
Here is my basic code where I set the images:
View preview = inflater.inflate(R.layout.list_video_preview, parent, false);
ImageView background = (ImageView)preview.findViewById(R.id.background);
ImageView forceground = (ImageView)preview.findViewById(R.id.forceground);
PictureDrawable play = SVGParser.getSVGFromResource(parent.getResources(), R.raw.play_blue).createPictureDrawable();
forceground.setImageDrawable(play);
The SVG paser is from svg-android.