Select Theme in Android Studio

When I select a theme in Android Studio, like this Holo I changed, it changes the preview but when I run the application on my device it doesn't change anything. Can anyone help ?

insert the description of the image here

Author: ramaral, 2016-02-12

2 answers

You are just changing the preview theme of Android Studio. to change the theme of the app you have to go to your AndroidManifest file.xml

And in the tag application changes the theme parameter.

<application
        android:theme="@android:style/Theme.Translucent" >

This is just one example: To see other themes or create your own custom see the following link: http://developer.android.com/guide/topics/ui/themes.html

 3
Author: Victor Gomes, 2016-02-12 11:59:43

In styles.xml, you will see the theme used in your application, as in this example:

<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>

    <style name="AppTheme.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>

    <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

    <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

</resources>

See that the above code has colors that have been externalized in the "colors" file.xml", which is in the "values" folder, with the following code:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#E76D00</color>
    <color name="colorPrimaryDark">#E76D00</color>
    <color name="colorAccent">#E76D00</color>

    <color name="colorTextView">#ff606060</color>
    <color name="colorTextViewDark">#ff020202</color>
</resources>

To edit your app's theme, Android Studio provides a default theme editor - with the Android Studio IDE open, go to the menu tools > Android > Theme Editor and there make the changes as you wish.

Now just type CTRL + s and then CTRL+F9 to see the result.

 1
Author: , 2016-03-23 23:34:03