Computer scienceMobileAndroidUser InterfaceGraphics

Themes and styles

Text color

Report a typo

Given the following style and theme in your themes.xml file:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="android:textColor">@color/blue</item>
</style>

<style name="BaseTextStyle">
    <item name="android:textColor">@color/red</item>
</style>

And the following TextView in your layout XML file:

<TextView
    style="@style/BaseTextStyle"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="What color am I?"/>

If the AppTheme is applied to the entire app, what will be the value of textColor in TextView?

Select one option from the list

Create a free account to access the full topic