harjot-oberai / VectorMaster

Dynamic control over vector drawables!
MIT License
1.59k stars 161 forks source link

Bug: VectorDrawable not shown correctly #32

Open AndroidDeveloperLB opened 1 year ago

AndroidDeveloperLB commented 1 year ago

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