org.apache.cordova.test.R Java Examples
The following examples show how to use
org.apache.cordova.test.R.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CordovaWebViewTestActivity.java From crosswalk-cordova-android with Apache License 2.0 | 6 votes |
/** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); //CB-7238: This has to be added now, because it got removed from somewhere else Config.init(this); cordovaWebView = (CordovaWebView) findViewById(R.id.cordovaWebView); cordovaWebView.init(this, new CordovaWebViewClient(this, cordovaWebView), new CordovaChromeClient(this, cordovaWebView), Config.getPluginEntries(), Config.getWhitelist(), Config.getExternalWhitelist(), Config.getPreferences()); cordovaWebView.loadUrl("file:///android_asset/www/index.html"); }
Example #2
Source File: CordovaWebViewTestActivity.java From cordova-amazon-fireos with Apache License 2.0 | 5 votes |
/** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // AWV Factory should be initialized before setting the layout if (!sFactoryInit) { factory = AmazonWebKitFactories.getDefaultFactory(); if (factory.isRenderProcess(this)) { return; // Do nothing if this is on render process } factory.initialize(this); sFactoryInit = true; } else { factory = AmazonWebKitFactories.getDefaultFactory(); } setContentView(R.layout.main); //CB-7238: This has to be added now, because it got removed from somewhere else Config.init(this); cordovaWebView = (CordovaWebView) findViewById(R.id.cordovaWebView); factory.initializeWebView(cordovaWebView, 0xFFFFFF, false, null); cordovaWebView.init(this, new CordovaWebViewClient(this, cordovaWebView), new CordovaChromeClient(this, cordovaWebView), Config.getPluginEntries(), Config.getWhitelist(), Config.getExternalWhitelist(), Config.getPreferences()); cordovaWebView.loadUrl("file:///android_asset/www/index.html"); }
Example #3
Source File: splashscreen.java From cordova-android-chromeview with Apache License 2.0 | 5 votes |
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.init(); // Show splashscreen this.setIntegerProperty("splashscreen", R.drawable.sandy); super.loadUrl("file:///android_asset/www/splashscreen/index.html", 2000); }
Example #4
Source File: CordovaResourceApiTest.java From cordova-amazon-fireos with Apache License 2.0 | 4 votes |
private Uri createTestImageContentUri() { Bitmap imageBitmap = BitmapFactory.decodeResource(activity.getResources(), R.drawable.icon); String stored = MediaStore.Images.Media.insertImage(activity.getContentResolver(), imageBitmap, "app-icon", "desc"); return Uri.parse(stored); }
Example #5
Source File: CordovaTest.java From cordova-amazon-fireos with Apache License 2.0 | 4 votes |
protected void setUp() throws Exception { super.setUp(); testActivity = this.getActivity(); testView = testActivity.findViewById(R.id.cordovaWebView); }
Example #6
Source File: CordovaResourceApiTest.java From crosswalk-cordova-android with Apache License 2.0 | 4 votes |
private Uri createTestImageContentUri() { Bitmap imageBitmap = BitmapFactory.decodeResource(activity.getResources(), R.drawable.icon); String stored = MediaStore.Images.Media.insertImage(activity.getContentResolver(), imageBitmap, "app-icon", "desc"); return Uri.parse(stored); }
Example #7
Source File: CordovaTest.java From crosswalk-cordova-android with Apache License 2.0 | 4 votes |
protected void setUp() throws Exception { super.setUp(); testActivity = this.getActivity(); testView = testActivity.findViewById(R.id.cordovaWebView); }
Example #8
Source File: CordovaWebViewTestActivity.java From cordova-android-chromeview with Apache License 2.0 | 3 votes |
/** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); cordovaWebView = (CordovaWebView) findViewById(R.id.cordovaWebView); cordovaWebView.loadUrl("file:///android_asset/www/index.html"); }