本文整理汇总了Java中org.xwalk.core.XWalkView.load方法的典型用法代码示例。如果您正苦于以下问题:Java XWalkView.load方法的具体用法?Java XWalkView.load怎么用?Java XWalkView.load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.xwalk.core.XWalkView
的用法示例。
在下文中一共展示了XWalkView.load方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreateView
import org.xwalk.core.XWalkView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// View rootView = inflater.inflate(R.layout.fragment_e1zone, container, false);
// return rootView;
View v = inflater.inflate(R.layout.fragment_e1zone, container, false);
mXWalkView = (XWalkView) v.findViewById(R.id.xwalkview);
//enable remote debugging
XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true);
xWalkCookieManager =new XWalkCookieManager();
xWalkCookieManager.setAcceptCookie(true);
//load extra from intent and set cookie to xwalkview
xWalkCookieManager.removeAllCookie();
String[] cookieArray = getActivity().getIntent().getStringArrayExtra("cookieArray");
for (String aCookieArray : cookieArray)
xWalkCookieManager.setCookie(getString(R.string.host_url), aCookieArray);
//start
mXWalkView.load(mUrl,null);
return v;
}
示例2: onXWalkReady
import org.xwalk.core.XWalkView; //导入方法依赖的package包/类
@Override
protected void onXWalkReady()
{
xWalkView = new XWalkView(this, this);
xWalkView.load("file:///android_asset/demo1.html", null);
ViewGroup viewGroup = (ViewGroup) findViewById(R.id.cross_parent);
viewGroup.removeAllViewsInLayout();
viewGroup.addView(xWalkView);
CrossjsUtil.getCrossjsUtil().addDynamicInjectObj(new InjectObj("dynamic", DynamicJs.class));
}
示例3: onActivityCreated
import org.xwalk.core.XWalkView; //导入方法依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
webView = (XWalkView) super.getActivity().findViewById(this.id);
int defaultFontSize = Integer.parseInt(prefs.getString(PrefsActivity.PREF_TEXT_SIZE, "16"));
webView.getSettings().setDefaultFontSize(defaultFontSize);
url = (String) getArguments().getString(OppiaWebViewFragment.TAG);
webView.load(url, null);
}
示例4: onActivityCreated
import org.xwalk.core.XWalkView; //导入方法依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
wv = (XWalkView) super.getActivity().findViewById(activity.getActId());
// get the location data
String url = course.getLocation()
+ activity.getLocation(prefs.getString(PrefsActivity.PREF_LANGUAGE, Locale.getDefault()
.getLanguage()));
int defaultFontSize = Integer.parseInt(prefs.getString(PrefsActivity.PREF_TEXT_SIZE, "16"));
wv.getSettings().setDefaultFontSize(defaultFontSize);
wv.load("file://" + url, null);
}
示例5: onCreate
import org.xwalk.core.XWalkView; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mXWalkView = (XWalkView) findViewById(R.id.activity_main);
// this loads a file from the assets/ directory
mXWalkView.load("file:///android_asset/www/index.html", null);
}
示例6: OpenURL
import org.xwalk.core.XWalkView; //导入方法依赖的package包/类
public void OpenURL(String URL){
try {
XWalkView xWalkWebView =(XWalkView)findViewById(R.id.xwalkWebView);
xWalkWebView.load(URL, null);
}
catch (Exception e) {
Log.e("URL Error:", e.toString());
}
}
示例7: onCreate
import org.xwalk.core.XWalkView; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_xwalk);
if (BuildConfig.DEBUG) {
XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true);
}
mWebView = (XWalkView) findViewById(R.id.webView);
mWebView.load("https://get.webgl.org", null);
}
示例8: onCreate
import org.xwalk.core.XWalkView; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.modal_activity);
// Here we allow the user to rotate the screen.
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
Intent intent = getIntent();
String baseUrl = intent.getStringExtra(IssueActivity.MODAL_URL);
orientation = intent.getIntExtra(IssueActivity.ORIENTATION, ActivityInfo.SCREEN_ORIENTATION_SENSOR);
// Click on the CLOSE button.
findViewById(R.id.btnCloseModal).setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
ModalActivity.this.finish();
}
});
// Initialize the webview
webView = (XWalkView) findViewById(R.id.modalWebView);
webView.setResourceClient(new XWalkResourceClient(webView) {
@Override
public boolean shouldOverrideUrlLoading(XWalkView view, String url) {
return false;
}
});
webView.load(baseUrl, null);
}
示例9: onLoadFinished
import org.xwalk.core.XWalkView; //导入方法依赖的package包/类
@Override
public void onLoadFinished(XWalkView view, String url) {
//super.onPageFinished(view, url);
Log.i(TAG, "**onLoadFinished "+url+"**");
// force inject of appdeck.js if needed
view.load(appdeck_inject_js, null);
//SmartWebView.this.invalidateHack(100);
root.progressStop(view);
CookieSyncManager.getInstance().sync();
String c = CookieManager.getInstance().getCookie(url);
Log.i(TAG, "Cookie: "+c);
}