0

访问模块的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();

爪哇代码

@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;
    }

我想pdfurl在 java 代码(而不是字符串 url)上获取字符串(在 JavaScript 中设置)。目前是null.

4

0 回答 0