简体   繁体   English

在应用程序启动时播放.swf文件

[英]Playing .swf File on Application Startup

I want my application to look more fancy. 我希望我的应用程序看起来更漂亮。 For that i have made an animation for the application startup. 为此,我为应用程序启动制作了动画。 its in .swf format. 其为.swf格式。 I want that whenever the user clicks the application icon on his android device and my application is launched it plays the animation first and then jumps into the main activity . 我希望每当用户单击其android设备上的应用程序图标并启动我的应用程序时, 它首先播放动画,然后跳到主要活动中 How can i accomplish that? 我该怎么做? the main which i don't know how to do is how to play the animation on the application startup and then jump into main activity! 我不知道怎么做的主要方法是如何在应用程序启动时播放动画,然后跳入主要活动! can anybody please explain this with the help of a complete example? 有人可以在完整示例的帮助下对此进行解释吗? am new to android! 是Android的新手!

First of all, a splash screens does not fit very well in Android but if you want it, you should load it into a WebView : 首先,启动屏幕在Android中不太适合,但如果需要,则应将其加载到WebView中:

    String localUrl ="file:///android_asset/my_anim.swf";

    WebView wv=(WebView) findViewById(R.id.anim_webView);
    wv.getSettings().setPluginsEnabled(true);
    wv.loadUrl(localUrl);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM