'How do I assign an id to a drawable in text view in the xml file?

How do I assign an id to a drawable in text view in the xml file.

The three dots is the drawable.

image

So I can find it by id.

findViewById<??????>(R.id.id_of_drawable)


Solution 1:[1]

I used an image view next to the text view. android:srcCompat made the image invisible. When I changed it to android:src it worked.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Leo