fix: bug of ui.Widget; add: sample for ui.Widget

This commit is contained in:
hyb1996
2018-10-14 14:34:34 +08:00
parent 1943e39573
commit 82fa139ec0
9 changed files with 122 additions and 27 deletions

View File

@@ -82,6 +82,11 @@ module.exports = function(runtime, global){
context.startActivity(Intent.createChooser(i, "发送邮件").addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
}
app.getUriForFile = function(file){
return android.support.v4.content.FileProvider.getUriForFile(context,
"org.autojs.autojs.fileprovider", new java.io.File(files.path(path)));
};
function toArray(arg){
if(typeof(arg) == 'string'){
return [arg];