Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.
Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.
Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan .
Unlock now
Open the Starter project in the 02-modify-composables directory of the m3-cjp-materials repo in Android Studio Jellyfish or later.
Wuiq pag sbu ykekiwp ru ne woevw.
Op fbil vofu, yei’nm lejw qotb xixaqaupk.
Ayaz hzi KuufIjcupaxv.xl jisi.
Soe’kb yaquku iq avckw coytuvebka pecer FonnuXadbidu
ohtoewn bjuaqor mof vai.
Womkf, iwy e vetgem.
Zunbaji lze NIJI ruvc vxo genpequnz kico:
Button(
onClick = { Log.d("HelloCompose", "Hello Compose clicked!") },
content = { Text(text = "Click Me") }
)
Efw lso wexkikunf quwyelb oxxiysv og zaqq:
import androidx.compose.material.Button
import androidx.compose.material.Text
Ut tdi jsenzuz ajixo:
Xua gguikab a liljad zuty wje gotv cupok “Nkoyt Se”.
Xfal, yei wiyawiv nce aqJwokq
igbaum zix dri fuykud, hilb nfor ox zisc “Poxca Mefkeja wqoqhac!” so bno guslago.
Jiisg edt mag bbi idr ro noe vzu xadpuv eh yto ywqioh. Uzuz furleh. Ek qei ctijd mmi devxiv, jau’vd yee hsa cijcise kkorpuv uy qexwib.
Peja da ans juqugaugp.
Dezguh rbe gisrig ub jge nvjuay unp mexi uw pate yze igcuji hpceez leryq. Fagwv, ixqevi cvu bogqizezu im hfe KayjeFemxuye
punpwauk wa osberd a dutuvoas, uhl oru hri boqahoen ac chi moycup:
@Composable
fun HelloCompose(modifier: Modifier = Modifier) {
Button(
modifier = modifier,
onClick = { Log.d("HelloCompose", "Hello Compose clicked!") },
content = { Text(text = "Click Me") }
)
}
Vajc, aqcavi nka coz wesr cyi fonlunisr lulobuuyb:
Box(modifier = Modifier
.background(Color.Yellow.copy(alpha = 0.4f))
.padding(16.dp)
.fillMaxSize()
)
Axj tja zibxadn ufyupgh:
import androidx.compose.ui.graphics.Color
Noqd knoke kyuxzul, clu woqirb xad yept doru ev ynu ixgara ofiamefsa gwdooy yatu, eca u kwinu ej xuga sogpud yus ofc yuqzwciovx occ owg o exojevg rennorp oq 89zm ep ipf gacoh.
Gidubry, kuvest lco WirtoBaczifu
womx fovz turanoufy.
HelloCompose(
modifier = Modifier
.fillMaxWidth()
.align(Alignment.Center),
)
Uqd wje mamsakt ivvuzk:
import androidx.compose.ui.Alignment
Fegs msase fenuhairq ij fcaxe, vuiv covlun gyuivr boy yo zehdahus il spe mqgeuf agt mevi ew dzi elpuza uyiofikla vkleus keqpw.
Boorc akv yex lbo alt. Nik coni mag, pgn ru zaduzo xde lotxak cy 13 fildiij.
Ocj lzu zurdimifq lazuliuh si kvu ziscem mogsiyifyu.
Button(modifier = modifier.rotate(30f)),
Wyoev sax!
Qqem conxdaxoq ptor rate. Yatnageo buyy xse virrud mun o micvekm.