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

Change textview background color #5

Closed feliperce closed 6 years ago

feliperce commented 6 years ago

Hello, how I can use your lib to change paths of a image, but this image are a TextView background?

I tried it, but not working:

val image = ImageView(context)

            val vector = VectorChildFinder(context, R.drawable.tag, image)
            val path1 = vector.findPathByName("body")
            val path2 = vector.findPathByName("fold")
            path1.setFillColor(Color.RED)

            image.invalidate()
            firstTag.background = ContextCompat.getDrawable(context, R.drawable.tag)
feliperce commented 6 years ago

I solved, it's my fault... Just set the textview background with imageview drawable

firstTag.background = image.drawable