Background Color

I changed ‘android:windowBackground’ and the adobe AIR stage color, but when I run the application there is a black color between the two colors. Is there a way for the black color to not appear?

Render mode “direct”.

    <style name="Theme.NoShadow" parent="android:style/Theme.NoTitleBar">
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowBackground">@color/white</item>
[SWF(width = "320", height = "480", frameRate = "60", backgroundColor = "#ff8800")]

how about mentioning which AIR SDK version you are using, the source code of the sample app, how did you compile, and which version of Android you are testing with, are you testing on real hardware or emulator?

AIR SDK version for Windows 10

Sorce Code:

   import flash.display.Sprite;

   [SWF(width = "320", height = "480", frameRate = "60", backgroundColor = "#ffffff")]

   public class Test extends Sprite
       public function Test()


<?xml version="1.0" encoding="utf-8"?>
<application xmlns="">
			<![CDATA[<manifest android:installLocation="auto">
				<uses-sdk android:minSdkVersion="21"/>
				<uses-permission android:name="android.permission.INTERNET" />



<?xml version="1.0" encoding="utf-8"?>
 * __________________
 * Copyright 2009 Adobe Systems Incorporated
 * All Rights Reserved.
 * NOTICE: All information contained herein is, and remains the property of
 * Adobe Systems Incorporated and its suppliers, if any. The intellectual
 * and technical concepts contained herein are proprietary to Adobe Systems
 * Incorporated and its suppliers and may be covered by U.S. and Foreign
 * Patents, patents in process, and are protected by trade secret or
 * copyright law. Dissemination of this information or reproduction of this
 * material is strictly forbidden unless prior written permission is obtained
 * from Adobe Systems Incorporated.

    <style name="Theme.NoShadow" parent="android:style/Theme.NoTitleBar">
        <item name="android:windowTranslucentStatus">true</item>
        <item name="android:windowBackground">@drawable/splash_background</item>



<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="">
    <item android:drawable="@color/splash_background_color" />



<?xml version="1.0" encoding="utf-8"?>
    <color name="opaque_blue">#00f</color>
    <color name="splash_background_color">#ffffff</color>

Compile with vscode as3mxml extension, but same result in animate cc with render mode direct.

Android version 7.1.1 Nougat in real hardware (OppoA83).

I assume you’re compiling to a captive runtime

so I’m a bit outdated on Android development and can not test right now but
I would say what you need is a splash screen (as a bitmap, not just a colored background).

see those 2 older blog posts

<?xml version="1.0" encoding="utf-8"?>
  <!-- Your AppTheme or other themes/styles here -->
  <!-- The launcher theme. It sets the main window background to the launch_screen drawable -->
  <style name=”AppTheme.Launcher”>
    <item name=”android:windowBackground”>@drawable/launch_screen</item>
    <!-- Optional, on Android 5+ you can modify the colorPrimaryDark color to match the windowBackground color for further branding-->
    <!-- <item name="colorPrimaryDark">@android:color/white</item> -->

Also some Android official docs

<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>
  • and App startup time
    to understand a bit more how things are connected and chained to each other
    for example:

    Cold startup takes 5 seconds or longer.
    Warm startup takes 2 seconds or longer.
    Hot startup takes 1.5 seconds or longer.

  • finally, even dev writing code natively for Android (without AIR) also struggle a lot to get their launch screen right, so yeah you gonna have to do a lot of little tests, with or without some options till it feels right.

I would advise that

  1. play/test with the colorPrimary, colorPrimaryDark and/or colorAccent
    see if it can “fill” the split second black background you’re experiencing
  2. definitively try to use a launch image, not just a windowBackground color, but a bitmap
    even just one color, try with the size ratio of your app, etc.
  3. try also with a gravity centered bitmap(not the full size of the app more like an icon)
    maybe even a transparent PNG :wink:

to me, from the top of my head (so without testing), the black screen you’re seeing in the launch sequence looks like the app is trying to display something but can not find the resource and so default to a black screen for that split second, so my logic is to provide the app that something that is missing, my gut feelings telling me it must be a splash screen or some kind of bitmap.

Also the Android doc App startup time do advice the following

Solutions to the problem

We recommend that, rather than disabling the preview window, you follow the common Material Design patterns. You can use the activity’s windowBackground theme attribute to provide a simple custom drawable for the starting activity.

For example, you might create a new drawable file and reference it from the layout XML and app manifest file as follows:

Layout XML file:

<layer-list xmlns:android="" android:opacity="opaque">
  <!-- The background color, preferably the same as your normal theme -->
  <item android:drawable="@android:color/white"/>
  <!-- Your product logo - 144dp color version of your app icon -->

so yeah … worth a shot

Thanks for helping @zwetan, but didn’t work

I tried it again, it seems like the time needed to start the flash context. Maybe the best solution is not to use adobe air / flash, it seems I regret learning it.

2 posts were split to a new topic: Android splash image over StageWebView with AIR