N
N
newdancer2016-05-15 00:07:08
Java
newdancer, 2016-05-15 00:07:08

How to make multiple multicolored round imageview through one dravable xml?

How to make multiple multicolored round imageview through one dravable xml?
When choosing a user, I need to change the color of the round picture. How to do this without creating a lot of drawable?
For example, there is a circle:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:dither="true"
       android:shape="oval" >
    <solid android:color="#FF0000" />
    <size
        android:height="40dp"
        android:width="40dp" />
</shape>

How to pass your color to the solid parameter? Or use a mask overlay with a background color on top of this imageview?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question