TextAppearance.A inherits from TextAppearance.A.B doesn't cause a circular reference in android styles?

前端 未结 1 978
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-26 07:10

I know that

we have not to use parent attribute. We prefix one style to another style separating by a period(.)

so in this style,

相关标签:
1条回答
  • 2021-01-26 07:25

    Technically As per Android Documentation I dont think this is possible, Because this will lead to duplication of style, If you refer to same as Diamond Problem it will be one of those, also android prevents you from inheriting from more than one style.

    Further Imagine if you have one attribute which is defined in style A also in Style B, it will be a problem at compile time that which attribute to choose from both.

    For More Details please refer to android documentation

    https://developer.android.com/guide/topics/ui/look-and-feel/themes

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