自定义提示位置
2023-01-24 09:16:15 最后更新
//调用模块(内容,X位置,Y位置,位置(顶部TOP 中间CENTER 底部BOTTOM 左边 LEFT 右边 RIGHT))
//注:当设置左边或者右边时默认在中间
fn toast.toast("toast提示",2,2,"TOP")
//以下代码放到模块中
//调用提示(toast)
fn toast(content,x,y,ip)
java(toast,null,"android.widget.Toast.makeText","android.content.Context",activity,"java.lang.CharSequence",content,"int",10000)
javags(center,"android.view.Gravity","android.view.Gravity",ip)
java(null,toast,"android.widget.Toast.setGravity","int",center,"int",x,"int",y)
java(null,toast,"android.widget.Toast.show")
end fn