Software Archive
Read-only legacy content
17061 Discussions

problem with intel idk and construct2 background transparent

Critikalman
Beginner
560 Views

I did an apk with Crosswalk, with Intel XDK. The app is a simple browser calling a web. The problem comes when you navigate to an html5 generated with construct2, the loading screen and the background is black. I set in construct2 a transparent background. Once the html5 is exported, I then edit the source code and set a background image outside construct2. When I open this html5 in desktop browser like Chrome, it works fine. But when I open it inthe app the background is missing and I only see black.

Any help on how to make the background to appear in the app, this means, not black but transparent, and hence with my image? Is this maybe an Intel XDKcompiler problem?

Thanks.

0 Kudos
9 Replies
Critikalman
Beginner
560 Views

thanks

0 Kudos
PaulF_IntelCorp
Employee
560 Views

I don't fully understand the problem you are trying to describe. It sounds like this FAQ might apply > https://software.intel.com/en-us/xdk/faqs/crosswalk#construct2-crosswalk-white-flash <

If you are trying to open external web pages I recommend you do that using the inAppBrowser plugin, and not open them directly within the webview. You have much more control and can force the page to open in the mobile browser.

0 Kudos
Critikalman
Beginner
560 Views

I created with construct2 a html5 export, this project  layers are transparent, i edit code html5 and using image background. When i created app with intel crosswalk go to index html5 but the transparent layer is black. you understand? Thanks

0 Kudos
Critikalman
Beginner
560 Views

 

 

this original code index.html

  <!-- All margins and padding must be zero for the canvas to fill the screen. -->
    <style type="text/css">
        * {
            padding: 0;
            margin: 0;
        }
        html, body {
            background: #000;
            color: #fff;
            overflow: hidden;
            touch-action: none;
            -ms-touch-action: none;
        }
        canvas {
            touch-action-delay: none;
            touch-action: none;
            -ms-touch-action: none;
        }
    </style>

i replace for:

  <!-- All margins and padding must be zero for the canvas to fill the screen. -->
    <style type="text/css">
        * {
            padding: 0;
            margin: 0;
        }
        html, body {
            background-image:url("http://aulavirtualmusica.com/images/fondo3.jpg")!important;
            color: #fff;
            overflow: hidden;
            touch-action: none;
            -ms-touch-action: none;
        }
        canvas {
            touch-action-delay: none;
            touch-action: none;
            -ms-touch-action: none;
        }
    </style>
    

but apk created with intel xdk no detect transparent layer and the background is black

 

0 Kudos
Critikalman
Beginner
560 Views

apk intel xdk is a crosswalk call  index.html

0 Kudos
Critikalman
Beginner
560 Views

 

this is the index.html

http://aulavirtualmusica.com/html5/teoria/index.html

in web is ok

in apk android created with intel xdk crosswalk  background canvas is black

0 Kudos
PaulF_IntelCorp
Employee
560 Views

I suggest you try the technique described in the FAQ. Specifically, this part of that FAQ:

Add the following lines to your intelxdk.config.additions.xml file:

<platform name="android">
    <!-- set Crosswalk default background color -->
    <!-- see http://developer.android.com/reference/android/graphics/Color.html -->
    <preference name="BackgroundColor" value="0x00000000" />
</platform>

The value 0x00000000 configures the webview background color to be "transparent black." Follow the link above for more details on how to configure the webview background colors. If you do not have an intelxdk.config.additions.xml file you'll have to create one. See this Intel XDK documentation page for information about where and how to create that file.

0 Kudos
Critikalman
Beginner
560 Views
I think the problem is in the execution of the full screen, if you put a transparent layer construct construct2 when running full screen ignores transparency.

crosswalk runs in full screen background that does not work 
0 Kudos
Critikalman
Beginner
560 Views

 

d the following lines to your intelxdk.config.additions.xml file:

1 <platform name="android">
2     <!-- set Crosswalk default background color -->
4     <preference name="BackgroundColor" value="0x00000000" />
5 </platform>

 

not solution of problem

0 Kudos
Reply