Changing color in a shape inside a layer-list programmatically

后端 未结 1 2009
梦谈多话
梦谈多话 2020-12-01 23:55

I am trying to change programmatically the color of the selectable_kachel_shape. Here is the xml file:

kachel_ticked_style.xml

1条回答
  •  我在风中等你
    2020-12-02 00:05

    Ok I found the answer, I just had to put the id of the shape inside the item not in the shape kachel_ticked_style.xml:

    
            
                
            
        
    

    And then you can change either the color of the shape calling shape.setColor or the color of the stroke calling shape.setStroke(strokeWidth,strokeColor)

    0 讨论(0)
提交回复
热议问题