harjot-oberai / VectorMaster

Dynamic control over vector drawables!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: VectorDrawable not shown correctly

AndroidDeveloperLB opened this issue · comments

I've tried to show this VectorDrawable, and it doesn't show the same on VectorMasterView compared to ImageView:

boy.zip

It doesn't show the eyes and the mouth, on both the IDE preview and when running the app:

image

Using this:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
    android:layout_height="match_parent" android:gravity="center" android:orientation="vertical"
    tools:context=".MainActivity">

    <ImageView
        android:id="@+id/imageView" android:layout_width="150dp" android:layout_height="150dp"
        android:src="@drawable/boy" />

    <com.sdsmdg.harjot.vectormaster.VectorMasterView
        android:id="@+id/vectorMasterView" android:layout_width="150dp" android:layout_height="150dp"
        app:vector_src="@drawable/boy" />
</LinearLayout>

Sample:

VectorDrawableChangerTest.zip