Android: Cloning a drawable in order to make a StateListDrawable with filters

前端 未结 7 820
梦谈多话
梦谈多话 2020-11-29 18:32

I\'m trying to make a general framework function that makes any Drawable become highlighted when pressed/focused/selected/etc.

My function takes a D

7条回答
  •  抹茶落季
    2020-11-29 19:07

    I answered a related question here

    Basically it seems like StateListDrawables indeed lose their filters. I created a new BitmapDrawale from a altered copy of the Bitmap I originally wanted to use.

提交回复
热议问题