杨培欢 发表于 2020-8-12 12:55:33

分享插件:查看时间


提取码:4795



来自解说社区客户端

轻狂书生。 发表于 2020-8-12 13:10:27

感谢插件大神的分享,沙发是我的了

来自:掌上乐园

pzle 发表于 2020-8-12 13:49:28





来自解说社区客户端

勇敢的骑士 发表于 2020-8-12 15:37:34

直接把插件粘贴到本论坛不就完了吗这个真是的讨厌的百度云台摆渡人太讨厌了烦人的必须下载那个,什么还让美好永远陪伴那些提示唉

来自:掌上乐园

杨培欢 发表于 2020-8-12 16:24:07

require "import"
import "android.widget.*"
import "com.androlua.*"
import "android.widget.ArrayAdapter"
import "android.widget.LinearLayout"
import "android.widget.TextView"
import "java.io.File"
import "android.widget.ListView"
import "android.app.AlertDialog"
InputLayout={
LinearLayout;

{

Button;
text="请开启定时器,定时器能帮您获取当前时间,并显示在屏幕上。";
onClick=function()
if ddd.text=="关闭定时器"
then
service.speak(os.date("%H:%M:%S").."")
else
service.click({{"开启定时器>5$0"}})
end
return true
end;
layout_width="2%w";
layout_height="2%w";
layout_marginTop="2%w";
id="eee";
};

{Button;
text="开启定时器";

onClick=function()

require "import"
import "com.androlua.Ticker"
if ti then
ti.stop()
ddd.text="开启定时器"
eee.text="请开启定时器,定时器能帮您获取当前时间,并显示在屏幕上。"
service.speak("已关闭")
ti=nil
return true
end
ti=Ticker()
ti.Period=100
ti.onTick=function()
eee.text=os.date("%H:%M:%S")..""
ddd.text="关闭定时器"
end
ti.start()
ddd.text="关闭定时器"
service.speak("已开启")
end;

layout_width="10%w";
layout_height="2%w";
layout_marginTop="5%w";
id="ddd";
};

};
dlg=LuaDialog()
.setView(loadlayout(InputLayout))
.setTitle("查看时间")
.setButton2("关闭",{onClick=function(v)
service.click({{"关闭定时器>5$0"}})
end})
.show()
eee.onLongClick=function()
if ddd.text=="关闭定时器"
then
service.click({{"%延时$0","%朗读/"..os.date("%H:%M:%S")}})
else
service.click({{"%延时$0","开启定时器>5$0"}})
end
return true
end;
service.click({{"?关闭定时器>10$100","<查看时间>10$500"}})



来自解说社区客户端

江静月 发表于 2020-8-12 18:38:45

感谢分享

来自冥河 http://download.vimfs.com/189cloud.php/169689552/像我这样的人 - 毛不易.mp3
页: [1]
查看完整版本: 分享插件:查看时间