ui页面保存配置
autojs吧
全部回复
仅看楼主
level 12
笔青居♂ 楼主
"ui";
ui.layout(<vertical padding="28"><ScrollView><vertical><input id="name1" hint="1"/><input id="name2" hint="2"/><input id="name3" hint="3"/><input id="name4" hint="4"/><input id="name10" hint="10"/><button id="ok" text="确定"/></vertical></ScrollView></vertical>);
var storage = storages.create("这个是一个文件名");for(i=0;i<4;i++){var content=storage.get("name"+(i+1));if(content){ui["name"+(i+1)].setText(content);}}
//指定确定按钮点击时要执行的动作ui.ok.click(function(){arr = new Array();for(i=0;i<4;i++){var content=ui["name"+(i+1)].getText()+"";storage.put("name"+(i+1),content);arr.push(content);}log(arr);});
2018年12月05日 10点12分 1
level 12
笔青居♂ 楼主
2018年12月05日 10点12分 2
level 1
[爱心]谢谢大神,正需要[玫瑰]
2019年04月21日 05点04分 3
level 1
提一嘴,这里请将getText改为text,否则会报错,大概是现在版本更新的缘故吧
2021年06月22日 12点06分 4
1