Skip to main content
Inspiring
December 21, 2017
Answered

AIR app on Android starts with a black gradient fill. Why?

  • December 21, 2017
  • 1 reply
  • 449 views

Hi!

I've noticed that all of my AIR apps start by showing a gradient screen like this http://prntscr.com/hqc91d

It looks especially bad on Super AMOLED screens with no back light.

I didn't pay real attention to this before because I thought it was some kind of a built-in AIR feature. But I've downloaded this gun simulator the other day https://play.google.com/store/apps/details?id=air.com.oranginalplan.weaphonesfree . As you can see, it's an AIR app too. And it starts up with a black screen! I went googling on it and didn't find any solution.

Does anyone know what is it? And how can I also make my app start with a black fill instead of this awkward gradient?

p.s. p.s. I suppose this happens only with some newer versions of AIR runtime (not sure where it started though), because I have one of my mobile apps running on AIR 4 and it starts with totally black screen, but I've never set anything up for this

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer kostyanych

The solution is found! Thanks to leokan23 from forum.starling-framework.org

Here's what you need to do, if you have the same issue

1) In your AIR SDK folder ( I used flex and Feathers sdk) go to \lib\android\lib\resources\app_entry\res\values\
2) Find styles.xml (always backup!) and open it with a text editor
3) Find this line: <item name="android:windowContentOverlay">@null</item> and add the following under it:
<item name="android:windowBackground">@drawable/launch</item> then save.

4) Go to \lib\android\lib\resources\captive_runtime\res\drawable\
5) Save launch.png (1 x 1 transparent png will be enough)
6) Compile your app using captive runtime. Then when you run the app, as soon as it is loaded, the image will popup.

1 reply

kostyanychAuthorCorrect answer
Inspiring
December 22, 2017

The solution is found! Thanks to leokan23 from forum.starling-framework.org

Here's what you need to do, if you have the same issue

1) In your AIR SDK folder ( I used flex and Feathers sdk) go to \lib\android\lib\resources\app_entry\res\values\
2) Find styles.xml (always backup!) and open it with a text editor
3) Find this line: <item name="android:windowContentOverlay">@null</item> and add the following under it:
<item name="android:windowBackground">@drawable/launch</item> then save.

4) Go to \lib\android\lib\resources\captive_runtime\res\drawable\
5) Save launch.png (1 x 1 transparent png will be enough)
6) Compile your app using captive runtime. Then when you run the app, as soon as it is loaded, the image will popup.