MD风格提示
2023-01-24 09:16:15 最后更新
//iyu调用代码
fn md.tw("MD提示!")
//新建一个md.myu
//mdtw
fn tw(show)
nvw(o,o,"线性布局","",obj)
nvw(o,obj,"线性布局","background=#323232",d)
swh("pxw",w)
us(d,"width",w)
nvw(o,d,"文本","linespacingextra=8\nlayout_margintop=14dp\nlayout_marginright=24dp\nlayout_marginbottom=10dp\nlayout_marginleft=24dp\ntextsize=14sp\ntextcolor=#ffffff",b)
us(b,"text",show)
call(toast,"mlua","lua.Toasts",obj)
end fn
//新建一个lua.mlua
function Toasts(cv)
--自定义tw
import "android.widget.*"
import "android.view.Gravity"
to=Toast(activity)
to:setGravity(Gravity.BOTTOM,0,0);
to:setView(cv)
to:show()
end