Egret Packaged App short black screen solution (Egret4.1.0)

Source: Internet
Author: User

Forum has been resolved: Http://bbs.egret.com/forum.php?mod=viewthread&tid=30288&highlight=app%2B%E9%BB%91%E5%B1%8F

Here is a detailed description of

The code for displaying and removing pictures is as follows:

Import Android.app.actionbar.layoutparams;import Android.widget.ImageView;
    //start the game, solve the black screen, the top-level display of the picture    PrivateLayoutparamsparams; PrivateImageView image;  Public voidStartgame () {params=Newlayoutparams (layoutparams.wrap_content, layoutparams.wrap_content); //Set Middle Position        params. Gravity = gravity.top| Gravity.left| Gravity.bottom|Gravity.right; Image=NewImageView ( This); Image.setscaletype (Imageview.scaletype.        Center_crop);        Image.setimageresource (R.drawable.start_screen); //Adding ControlsAddcontentview (Image,params); }        //hide the top-level display image after the game starts     Public voidGamestartend () {image.setvisibility (view.gone); }

The top-level display picture can be placed under the Res->drawable folder, which I use here with the Boya startup image. Images placed under Res can be called in code using R.drawable.

This code is pasted in the main file, and here I am testapp.java.

Call Startgame in OnCreate.

After Egret boot is complete, remove the picture using Externalinterface notification native

Native Receive Egret Boot completion information, call gamestartend remove picture

Egret Packaged App short black screen solution (Egret4.1.0)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.