Drawable => grayscale

前端 未结 4 1435
清歌不尽
清歌不尽 2020-12-07 23:22

What would be the right way to turn a color Drawable into a grayscale one (to indicate disabled state)?

EDIT:
B/W => grayscale

4条回答
  •  庸人自扰
    2020-12-07 23:40

    Are you specifically wanting to do this programatically and not just with disabled versions of the images? You could reference an XML drawable, something like:

    
        
        
        
        
        
        
        
    
    

提交回复
热议问题