Upstream version 6.35.131.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / android / sample / src / org / xwalk / core / sample / XWalkPreferencesActivity.java
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.
4
5 package org.xwalk.core.sample;
6
7 import org.xwalk.core.XWalkPreferences;
8 import org.xwalk.core.XWalkView;
9
10 import android.app.Activity;
11 import android.os.Bundle;
12
13 public class XWalkPreferencesActivity extends Activity {
14
15     @Override
16     protected void onCreate(Bundle savedInstanceState) {
17         super.onCreate(savedInstanceState);
18         setContentView(R.layout.xwview_layout);
19         XWalkView xwalkView = (XWalkView) findViewById(R.id.xwalkview);
20
21         // Enable remote debugging.
22         // You can debug the web content via PC chrome.
23         XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true);
24
25         xwalkView.load("http://www.baidu.com/", null);
26     }
27 }