Skip to content

Instantly share code, notes, and snippets.

View ychescale9's full-sized avatar
🏠
Working from home

Yang ychescale9

🏠
Working from home
View GitHub Profile
@AlexGabor
AlexGabor / LoginScreenExample.kt
Created August 30, 2022 14:38
state holder instead of vm
@Composable
fun LoginScreen(
modifier: Modifier = Modifier,
state: LoginScreenState = rememberLoginScreenState(),
) {
// ...
}
@Composable
fun rememberLoginScreenState(
@Preview(showBackground = true, showSystemUi = true)
@Composable
fun App() {
Column {
MarxistRow {
Text("Left Text", Modifier.background(Color.Red))
Text("Right Text", Modifier.background(Color.Blue))
}
MarxistRow {
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.core.tween
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer