Revolutionized UI Development with Compose Playground
DISCUSS THE BACKGROUND OF UI, WHY AND HOW TO USE JETPACK COMPOSE. ALSO, DISCUSS KOTLIN CONCEPTS THAT IS EXTENSIVELY USED IN BUILDING COMPOSE APP AND QUICK LIVE CODING SESSION.
DEVELOPMENT? •Jetpack Compose is Android’s recommended modern toolkit for building native UI. It simplifies and accelerates UI development on Android. Quickly bring your app to life with less code, powerful tools, and intuitive Kotlin APIs. •It use declarative approach rather imperative.
function name. • High Order function A higher-order function is a function that takes functions as parameters or returns a function. Jump into kotlin playground for looking a few examples: https://developer.android.com/training/kotlinplayground
Doesn’t have a state, not hold, define, or modify any state. Owns a piece of state that can change overtime. EditableTextView( text = R.string.total_amount, value = amount, onValueChange = { amount = it }, KeyboardOptions(keyboardType = KeyboardType.Number).copy( imeAction = ImeAction.Next ), R.drawable.ic_money ) var amount by remember { mutableStateOf("") } var tip by remember { mutableStateOf("") } var tipSwitchChecked by remember { mutableStateOf(false) } val resultAmount = amount.toDoubleOrNull() ?: 0.0 val resultTip = tip.toDoubleOrNull() ?: 0.0 val resultantTip = tipCalculator( resultAmount, resultTip,