📅  最后修改于: 2022-03-11 14:55:58.885000             🧑  作者: Mango
inner class yourThread : Thread() {
override fun run() {
// this is for fragment, you can use 'this' for Activity
requireActivity().runOnUiThread {
// Your Toast
Toast.makeText(requireContext(), "Toasted", Toast.LENGTH_LONG).show()
}
}