mirror of
https://github.com/webodf/WebODF.git
synced 2026-11-30 16:47:58 +01:00
Switch to a sencha touch based ui.
This ui is shared with the iOS version of WebODF.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package org.webodf;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.phonegap.DroidGap;
|
||||
|
||||
public class WebODFActivity extends DroidGap {
|
||||
|
||||
private String path;
|
||||
|
||||
/** Called when the activity is first created. */
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
path = null;
|
||||
if (getIntent() != null && getIntent().getData() != null) {
|
||||
path = getIntent().getData().getPath();
|
||||
}
|
||||
setContentView(R.layout.main);
|
||||
super.loadUrl("file:///android_asset/www/index.html");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if (path == null) {
|
||||
return;
|
||||
}
|
||||
String escapedPath = "file://" + path.replace("'", "\\'");
|
||||
sendJavascript("invokeString = '" + escapedPath + "';");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user