devendroid / VectorChildFinder

VectorChildFinder helps to find inner elements of vector drawable like path and group.
Apache License 2.0
202 stars 41 forks source link

can you update this library to latest app compat elements #17

Open zeeshanrasool91 opened 2 years ago

micstart commented 1 year ago

This can be done through Java reflection. First reflect call VectorDrawable.getTargetByName or VectorDrawableCompat.getTargetByName method to get VFullPath: Object path = ReflectUtil.invoke(vectorDrawable, "getTargetByName", new Class[]{String.class}, new Object[]{pathName}); Then Reflect calls the VFullPath.setFillColor method to set the color: ReflectUtil.invoke(path, "setFillColor", new Class[]{int.class}, new Object[]{color});

devmike01 commented 1 year ago

This has been done already. Please check the latest release: https://github.com/devendroid/VectorChildFinder/releases/tag/1.0.1

IsLery commented 12 months ago

The version 1.0.1 has an error in jitpack, can't download

devmike01 commented 12 months ago

@IsLery The version doesn't have any known errors. Share your stack trace.

IsLery commented 12 months ago

image

image

IsLery commented 9 months ago

@devmike01 could you please take a look?

devmike01 commented 9 months ago

Hi @IsLery , I'm looking into this now.

devmike01 commented 9 months ago

I have submitted a PR to fix this. However, while waiting for approval you can use this: implementation 'com.github.devmike01:VectorChildFinder:1.1.1-beta' @IsLery