Computer scienceMobileAndroidUser InterfaceGraphics

Themes and styles

Theming up

Report a typo

Given the following theme in your themes.xml file:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
</style>

And the following activity in your AndroidManifest.xml file:

<activity android:name=".MyActivity">
</activity>

Add the line of code that should apply the theme AppTheme to this activity.

Enter a short text

Create a free account to access the full topic