var main = plus.android.runtimeMainActivity();
var but = new ImageButton(main);
var path = plus.io.convertLocalFileSystemURL("/image/default.png");
var bitmap = BitmapFactory.decodeFile(path);
var clickEvent = plus.android.implements('android.view.View.OnClickListener',{
"onClick":function(v){
console.log('onclick jion');
plus.nativeUI.toast( "点击响应");
}
});
but.setOnClickListener(clickEvent);
0 个回复