访问模块的java脚本
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
Ti.API.info("module is => " + module);
var proxy = module.createExample({
height : '200dp',
pdfurl:"http://10.1.2.38:8080/ls/DOWNLOAD/ex.pdf",
lckey:"XXXXXX",
backgroundColor : '#FFFFFF'
});
proxy.showPdfBy(pdfurl);
win.add(proxy);
win.open();
java代码
@Override
public TiUIView createView(Activity activity) {
R.string.text_ok = ResUtil.instance().getResId("string", "text_ok",
getActivity());
**String url = activity.getIntent().getStringExtra("pdfurl");**
AppLog.errorLog("backgroundColor ---||------ = " +url );
TiUIView view = new PdfTiView(this);
view.getLayoutParams().autoFillsHeight = true;
view.getLayoutParams().autoFillsWidth = true;
return view;
}
我想在java代码(而不是String url)上获取pdfurl
字符串(在JavaScript中设置)。目前是null
。