java可以插入动画吗,如何插入Java中为Android(Eclipse的)一个SWF动画(FLASH)

I've been googling it for days and I still can't find anything, I've already tried some codes, but I'm also really noob at java so every single code I've been trying, it fails...

Well, I'm going to try to explain.

I'm coding an app which uses 3 activities. The first one has a button that opens the 2nd activity, and in the second activity I wanted to play an animation, but once I can't make it play a video, nor a .gif, I've converted the gif to .swf, and I still can't make it work.

Then I noticed that the problem must be mine :P

It's the first question I'm making, and I swear I've already looking at the others but I really can't find a solution... But as far as I know you're a pretty good community that like to help the others, and I really appreciate it.

Can you guys help me putting my .swf working when I launch the second activity? I'd be very grateful.

Btw, if you don't understand something that I said, just let me know, I know my english isn't the best :p

Best regards,

xickoh

解决方案

Android version higher than Gingerbread(2.3) does not support Flash.

For Android version below ICS(4.~), you can insert a swf file to webview.

WebView wv = (WebView) findViewById(your id);

WebSettings ws = wv.getSettings();

ws.setPluginState(PluginState.ON);

ws.setJavaScriptEnabled(true);

wv.loadUrl(SWF FilePath);

Hope this helps.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值