1 // Copyright (c) 2014 Intel Corporation. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 package org.xwalk.core.sample;
7 import org.xwalk.core.XWalkView;
9 import android.os.Bundle;
11 public class OnHideOnShowActivity extends XWalkBaseActivity {
14 protected void onCreate(Bundle savedInstanceState) {
15 super.onCreate(savedInstanceState);
16 setContentView(R.layout.xwview_layout);
17 mXWalkView = (XWalkView) findViewById(R.id.xwalkview);
19 // The web page below will display a video.
20 // When home button is pressed, the activity will be in background, and the video will be paused.
21 mXWalkView.load("http://www.w3.org/2010/05/video/mediaevents.html", null);