Skip to content

ToastDemo.lua

xu.jingyu edited this page Dec 24, 2019 · 4 revisions

Toast

copy下面代码,运行试试

label =  Label():marginTop(120):height(30):bgColor(Color(121,12,45,1.0)):setGravity(Gravity.CENTER_HORIZONTAL)
label:text("点我弹个Toast")

window:addView(label)

Toast('你好啊david',1.0)

label:onClick(function()
    Toast("点击了Label",2.0)
end)
Clone this wiki locally