editText.clearFocus()view.setWindowInsetsAnimationCallback(object : WindowInsetsAnimation.Callback {
override fun onEnd(animation: WindowInsetsAnimation) {
super.onEnd(animation)
val showingKeyboard = view.rootWindowInsets.isVisible(WindowInsets.Type.ime())
if (!showingKeyboard){edittext.clearFocus()}
}
})@Dao
interface DaoPlayerDb {
@Insert
fun insertPlayer(playerDbEntity: DataPlayer)
@Query("SELECT * FROM playerstab")
fun getAllPlayer(): Flow<List<PlayerDbEntity>>
}interface Product {val price: Int}
data class Coffee(
val id:Int,
val name:String,
override val price:Int
) : Product
data class Dessert(
val id:Int,
val name:String,
override val price:Int
) : Product
data class Order(
val id:Int,
val orderItem:MutableList<Product>,
)new MainActivity().handleMqttMessage();var myClass = MyClass()
myClass.flashLight()MyClass.flashLight() (userChoice == "1" && gameChose == "3") ||
(userChoice == "2" && gameChose == "1") ||
(userChoice == "3" && gameChose == "2") ->positiveAnswer ->
{
val gameChose = getGameChose(options)
val userChoice = getUserChose(options)
getResult(gameChose, userChoice)
println("Do you want to play any more?")
playGameAnswer = readLine()
}