Using shape drawable as my background xml

前端 未结 5 760
悲&欢浪女
悲&欢浪女 2020-12-29 23:06

I really appreciate if someone can help me with using how to use shape drawable as my background xml for my view.

This is what I tried: But I never get the color. An

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-29 23:40

    It seems like there are a couple of problems here. The biggest one seems to be the idea that you can use a shape as a text color and that doesn't seem to make sense. You can use a color as a background of a shape, and you can set a shape as the background of view but you can't set a shape as text background or foreground.

    The other thing that looks wrong is that in the alternative XML files that you tried, the end quotes around the color values are missing, so that shouldn't compile at all.

提交回复
热议问题