Skip to content

Instantly share code, notes, and snippets.

@pao
Created June 18, 2011 00:55
Show Gist options
  • Save pao/1032683 to your computer and use it in GitHub Desktop.
Save pao/1032683 to your computer and use it in GitHub Desktop.
package com.olearyp.ponyboard;
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.webkit.WebSettings;
import android.webkit.WebSettings.ZoomDensity;
import android.webkit.WebView;
public class PonySWFLauncherActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final WebView webview = new WebView(this);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(webview);
final WebSettings settings = webview.getSettings();
settings.setPluginsEnabled(true);
settings.setPluginState(WebSettings.PluginState.ON);
settings.setBlockNetworkLoads(true);
settings.setDefaultZoom(ZoomDensity.CLOSE);
webview.loadUrl("file:///android_res/raw/soundboard_wrapper.html");
}
}
<!DOCTYPE html>
<html><head></head><body><div<embed src="file:///android_res/raw/soundboard.swf" scale="exactfit" style="width:250%;height:200%;" /></body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment