应用内通知(Notification)
Teamhelper Community2024-04-15 01:25:00 

GlassNotification(mContext, instructManager).apply {
icon = ContextCompat.getDrawable(mContext, R.drawable.baseline_apartment_24)
title = "提示"
content = "这是一个带标题的提示框"
durationMills = 3
show()
}
GlassNotification DSL {
...
icon = ContextCompat.getDrawable(mContext, R.drawable.baseline_apartment_24)
...
}
GlassNotification DSL {
...
title = "提示"
...
}
GlassNotification DSL {
...
content = "这是一个带标题的提示框"
...
}
GlassNotification DSL {
...
durationMills = 3
...
}
GlassNotification(mContext, instructManager).apply {
content = "检测当前光线较暗是否打开手电筒?"
confirmButton = Pair(InstructSingle("que ding", "确定", "Confirm")) {
toast("点击了确定")
}
cancelButton = Pair(InstructSingle("qu xiao", "取消", "Cancel")) {
toast("点击了取消")
}
durationMills = 3
show()
}