本文整理汇总了Java中org.apache.cordova.engine.SystemWebView类的典型用法代码示例。如果您正苦于以下问题:Java SystemWebView类的具体用法?Java SystemWebView怎么用?Java SystemWebView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SystemWebView类属于org.apache.cordova.engine包,在下文中一共展示了SystemWebView类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: startUriIntentCheck
import org.apache.cordova.engine.SystemWebView; //导入依赖的package包/类
@Test
public void startUriIntentCheck() {
StandardActivity activity = (StandardActivity) mActivityRule.getActivity();
final SystemWebView webView = (SystemWebView) activity.getWindow().getCurrentFocus();
try {
mActivityRule.runOnUiThread(new Runnable() {
@Override
public void run() {
String uri = webView.getUrl();
assertFalse(uri.equals(FALSE_URI));
}
});
} catch (Throwable throwable) {
throwable.printStackTrace();
}
}
开发者ID:alex-shpak,项目名称:keemob,代码行数:17,代码来源:StandardActivityTest.java
示例2: onCreate
import org.apache.cordova.engine.SystemWebView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//Set up the webview
ConfigXmlParser parser = new ConfigXmlParser();
parser.parse(this);
SystemWebView webView = (SystemWebView) findViewById(R.id.cordovaWebView);
webInterface = new CordovaWebViewImpl(new SystemWebViewEngine(webView));
webInterface.init(cordovaInterface, parser.getPluginEntries(), parser.getPreferences());
webView.loadUrl(parser.getLaunchUrl());
}
开发者ID:alex-shpak,项目名称:keemob,代码行数:16,代码来源:EmbeddedWebViewActivity.java
示例3: webViewCheck
import org.apache.cordova.engine.SystemWebView; //导入依赖的package包/类
@Test
public void webViewCheck() {
StandardActivity activity = (StandardActivity) mActivityRule.getActivity();
//Fish the webview out of the mostly locked down Activity using the Android SDK
View view = activity.getWindow().getCurrentFocus();
assertEquals(SystemWebView.class, view.getClass());
}
开发者ID:alex-shpak,项目名称:keemob,代码行数:8,代码来源:StandardActivityTest.java
示例4: checkBackgroundIntentCheck
import org.apache.cordova.engine.SystemWebView; //导入依赖的package包/类
@Test
public void checkBackgroundIntentCheck() {
StandardActivity activity = (StandardActivity) mActivityRule.getActivity();
final SystemWebView webView = (SystemWebView) activity.getWindow().getCurrentFocus();
CordovaWebView webInterface = webView.getCordovaWebView();
CordovaPreferences prefs = webInterface.getPreferences();
assertFalse(prefs.getInteger("backgroundcolor", Color.BLACK) == Color.GREEN);
}
开发者ID:alex-shpak,项目名称:keemob,代码行数:9,代码来源:StandardActivityTest.java
示例5: onCreate
import org.apache.cordova.engine.SystemWebView; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// Set by <content src="index.html" /> in config.xml
loadUrl(launchUrl);
WebSettings ws = ((SystemWebView)super.appView.getView()).getSettings();
ws.setMediaPlaybackRequiresUserGesture(false);
}
开发者ID:arcweb,项目名称:chappiecast,代码行数:10,代码来源:MainActivity.java
示例6: encapulateWebChromeClientForView
import org.apache.cordova.engine.SystemWebView; //导入依赖的package包/类
private WebChromeClient encapulateWebChromeClientForView(WebView view) {
if (view.getClass().getSimpleName().equalsIgnoreCase("CordovaWebView")) {
return encapsulatedCordovaChromeClientForView((CordovaWebView)view);
} else if (view.getClass().getSimpleName().equalsIgnoreCase("SystemWebView")) {
return new ExtendedSystemWebChromeClient(new SystemWebViewEngine((SystemWebView)view));
} else {
try {
Object webChromeClient = getWebClientViaReflection(view, "mWebChromeClient");
if (webChromeClient != null) {
return new WrappedChromeClient((WebChromeClient) webChromeClient);
}
} catch(Exception e) {}
return new SelendroidWebChromeClient();
}
}
开发者ID:selendroid,项目名称:selendroid,代码行数:16,代码来源:SelendroidWebDriver.java
示例7: InjectWebViewEngine
import org.apache.cordova.engine.SystemWebView; //导入依赖的package包/类
public InjectWebViewEngine(SystemWebView webView) {
super(webView);
webView.setWebViewClient(new InjectWebViewClient(this));
}
开发者ID:fastrde,项目名称:cordova-plugin-fastrde-injectview,代码行数:5,代码来源:InjectWebViewEngine.java
示例8: SelendroidSystemWebViewClient
import org.apache.cordova.engine.SystemWebView; //导入依赖的package包/类
public SelendroidSystemWebViewClient(SystemWebView view) {
super(new SystemWebViewEngine(view));
}
开发者ID:selendroid,项目名称:selendroid,代码行数:4,代码来源:SelendroidWebDriver.java
注:本文中的org.apache.cordova.engine.SystemWebView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论