Jetpack Compose


Reading time: less than 1 minute

Jetpack Compose is a modern UI framework for Android applications written in Kotlin.

Self-updating widget

@Composable  
fun Time() {  
    var dt by remember { mutableStateOf("") }  
  
    LaunchedEffect(key1 = Unit) {  
        while (true) {  
            dt = LocalDateTime.now().toString()  
            delay(500)  
        }  
    }  
  
    Text(text = dt)  
}

Citation

If you find this work useful, please cite it as:
@article{yaltirakli,
  title   = "Jetpack Compose",
  author  = "Yaltirakli, Gokberk",
  journal = "gkbrk.com",
  year    = "2025",
  url     = "https://www.gkbrk.com/jetpack-compose"
}
Not using BibTeX? Click here for more citation styles.
IEEE Citation
Gokberk Yaltirakli, "Jetpack Compose", January, 2025. [Online]. Available: https://www.gkbrk.com/jetpack-compose. [Accessed Jan. 01, 2025].
APA Style
Yaltirakli, G. (2025, January 01). Jetpack Compose. https://www.gkbrk.com/jetpack-compose
Bluebook Style
Gokberk Yaltirakli, Jetpack Compose, GKBRK.COM (Jan. 01, 2025), https://www.gkbrk.com/jetpack-compose

Comments

© 2024 Gokberk Yaltirakli