当前位置: 首页>>代码示例>>Java>>正文


Java XWalkView.load方法代码示例

本文整理汇总了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;
    }
 
开发者ID:Naiqus,项目名称:E1zone_Android_Client,代码行数:22,代码来源:XWalkViewFragment.java

示例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));
}
 
开发者ID:CLovinr,项目名称:crosswalk-js-inject,代码行数:12,代码来源:MainActivity.java

示例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);

}
 
开发者ID:iSchool-Zambia,项目名称:ischool-oppia-mobile,代码行数:12,代码来源:OppiaWebViewFragment.java

示例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);
}
 
开发者ID:iSchool-Zambia,项目名称:ischool-oppia-mobile,代码行数:15,代码来源:PageWidget.java

示例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);
}
 
开发者ID:trujunzhang,项目名称:CrossWalkAndroidStudio,代码行数:10,代码来源:MainActivity.java

示例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());
    }
}
 
开发者ID:conetix,项目名称:nocdisplay,代码行数:10,代码来源:NOCDisplay.java

示例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);
}
 
开发者ID:tegon,项目名称:crosswalk-sample,代码行数:13,代码来源:XWalkActivity.java

示例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);
}
 
开发者ID:bakerframework,项目名称:baker-android-refactor,代码行数:32,代码来源:ModalActivity.java

示例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);
    
}
 
开发者ID:Mobideck,项目名称:appdeck-android,代码行数:19,代码来源:XSmartWebView.java


注:本文中的org.xwalk.core.XWalkView.load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。