java.lang.ClassCastException: android.graphics.drawable.LayerDrawable cannot be cast to android.graphics.drawable.GradientDrawable

前端 未结 3 426
小鲜肉
小鲜肉 2021-01-01 02:50

In my application I am trying change background color for each listView item. And for that I am using shapes which in layer-list. Here is my code

drop_shadow.xml

3条回答
  •  一向
    一向 (楼主)
    2021-01-01 03:24

    i guess it's better to use separacte colors.xml file for the color of the shape, and use tag, you can delete the .

    after all your shape both is the same which is rectangle.

    previously i got the same error because i'm using and inside the same xml.

提交回复
热议问题