Android – why do the properties textapparancelarge and textapparancemedium define different text colors

There are three styles in the styles.xml file:

<style name="TextAppearance.Large">
    <item name="android:textSize">22sp</item>
</style>
<style name="TextAppearance.Medium">
    <item name="android:textSize">18sp</item>
</style>
<style name="TextAppearance.Small">
    <item name="android:textSize">14sp</item>
    <item name="android:textColor">?textColorSecondary</item>
</style>

Textappearance.small has different colors, but textappearance.large and textappearance.medium should have the same color

If you set these styles in textview:

android:textAppearance="?android:attr/textAppearanceLarge"

and

android:textAppearance="?android:attr/textAppearanceMedium"

Their colors are slightly different

Why and where can I find these colors?

resolvent:

If you want to view the declaration of a property or method, right-click the property – > open the go to submenu – > click the declaration or use the shortcut key STRG B

You can now see attrs. XML. XML from the selected topic

There is an inline annotation display style reference

In my case, I use a light theme with different text sizes and different colors

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>