I am showing related text in a TextView. At the beginning, my code is as follows:
<TextView
style="@style/informed_consent_check_TextView"
android:id="@+id/accept_content_1"
android:text="@string/informed_consent_accept"
/>
<style name="informed_consent_check_TextView" >
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textSize">13dp</item>
<item name="android:textColor">#fff</item>
<item name="android:textColorLink">#fff000</item>
</style>
It is working fine. The text of the text link is as follows:

What I want.
However, after moving the text attributes to the style. It does not work properly.
<style name="informed_consent_content_textAppearance">
<item name="android:textSize">13dp</item>
<item name="android:textColor">#fff</item>
<item name="android:textColorLink">#fff000</item>
</style>
<style name="informed_consent_check_TextView" >
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textAppearance">@style/informed_consent_content_textAppearance</item>
</style>
The text of the link displays the wrong color:

And then, I move the textAppearance attribute to the TextView. But this is still wrong.
<TextView
style="@style/informed_consent_check_TextView"
android:id="@+id/accept_content_1"
android:text="@string/informed_consent_accept"
android:textAppearance="@style/@style/informed_consent_content_textAppearance"/>
My device is 4.1.2.
Who can help me. Many thanks.
source
share