Created
March 7, 2013 17:34
-
-
Save rhumlover/5109983 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
WebView wview = (WebView) findViewById(R.id.webviewD); | |
wview.setWebChromeClient(new WebChromeClient(){ | |
@Override | |
public void onShowCustomView(View view, CustomViewCallback callback) { | |
super.onShowCustomView(view, callback); | |
if (view instanceof FrameLayout){ | |
FrameLayout frame = (FrameLayout) view; | |
if (frame.getFocusedChild() instanceof VideoView){ | |
VideoView video = (VideoView) frame.getFocusedChild(); | |
frame.removeView(video); | |
MainActivity.this.setContentView(video); | |
video.start(); | |
} | |
} | |
} | |
}); | |
WebSettings webSettings = wview.getSettings(); | |
webSettings.setJavaScriptEnabled(true); | |
webSettings.setPluginsEnabled(true); | |
webSettings.setRenderPriority(RenderPriority.HIGH); | |
wview.loadUrl("http://orange.jobs/jobs/mobi.do?do=getOffer&lang=FR&id=28866"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment