Toast工具
函数 | 案例 | 结果 |
---|---|---|
toast(content: String?) | toast(“xxx”) | |
assertNoToast(content: String?): Boolean | private var data: Int? = null private fun checkData(): Boolean { if (data == null) return assertNoToast(“xxx”) return true } |
private fun sendData() { if (!checkData()) return // TODO send data } |