mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
CB-800: Fix preferences for the CordovaWebView. - Test case needed to implement CordovaInterface.
This commit is contained in:
parent
ffa1eb1ee9
commit
f74d8aaf2b
@ -28,6 +28,6 @@ public class CordovaActivity extends DroidGap {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
super.loadUrl("file:///android_asset/index.html");
|
||||
super.loadUrl("file:///android_asset/www/index.html");
|
||||
}
|
||||
}
|
||||
|
@ -20,28 +20,76 @@
|
||||
package org.apache.cordova.test;
|
||||
|
||||
import org.apache.cordova.CordovaWebView;
|
||||
import org.apache.cordova.api.CordovaInterface;
|
||||
import org.apache.cordova.api.IPlugin;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
public class CordovaWebViewTestActivity extends Activity implements CordovaInterface {
|
||||
|
||||
public class CordovaWebViewTestActivity extends Activity {
|
||||
|
||||
CordovaWebView phoneGap;
|
||||
|
||||
/** Called when the activity is first created. */
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.main);
|
||||
|
||||
|
||||
phoneGap = (CordovaWebView) findViewById(R.id.phoneGapView);
|
||||
|
||||
|
||||
phoneGap.loadUrl("file:///android_asset/www/index.html");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void onDestroy()
|
||||
{
|
||||
super.onDestroy();
|
||||
//phoneGap.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startActivityForResult(IPlugin command, Intent intent, int requestCode) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActivityResultCallback(IPlugin plugin) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindBackButton(boolean override) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBackButtonBound() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Activity getActivity() {
|
||||
// TODO Auto-generated method stub
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancelLoadUrl() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object onMessage(String id, Object data) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user