Set Android Studio Background Color

Asked 1 years ago, Updated 1 years ago, 38 views

The default background color for Android Studio is white, so is there any way to change it to a different color at once? There are more than 20 xml files, so it's hard to insert the code one by one.

If there's a way to change the color at once, please share it with us

android-studio

2022-09-22 17:59

1 Answers

Write the theme you want in style.xml.

Apply in AndroidManifest.xml.

ex)

style.xml

  <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/azure</item>
        <item name="colorPrimaryDark">@color/deep_sky_blue</item>
        <item name="colorAccent">@color/azure</item>
        <item name="android:windowBackground">@color/colorWhite</item>
        <item name="android:selectableItemBackground">@drawable/pre_lollipop_selectable_item</item>
        <item name="android:screenOrientation">portrait</item>
        <item name="actionBarStyle">@style/CustomActionBar</item>
    </style>
AndroidManifest.xml
 <application
        android:name=".application.BaseApplication"
        android:allowBackup="true"
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
        android:windowSoftInputMode="stateAlwaysHidden">
    ...


2022-09-22 17:59

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.