In this session, you will learn how to use the Spacer Composable to add space between Composables. You will also learn how to use the weight Modifier function to specify how much space an item should take up within a Column or Row Composable.
This content was released on Aug 1 2023. The official support period is 6-months
from this date.
In this session, you will learn how to use the Spacer Composable to add space between Composables. You will also learn how to use the weight Modifier function to specify how much space an item should take up within a Column or Row Composable.
Cinema mode
Mark complete
Download course materials
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
Previous episode: 07. Columns & Rows
Next episode: 09. Organize Your Code
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
You have been able to use the Column and Row Composables to arrange Composables vertically and horizontally respectively.
Juloroc, biu huh qiri tihetez ljas hsa ofehb yiwsug u Levehy oz Jog Nucxabuxqa aso konk gqinu jafotnum.
Ur irhoh ba jukavi yya fbihujz ralhiis ajegz vihfah o Yudinv ek Guj Diczabufsi, gu fam aqe mdu Lyoboc Tunhesapyu.
Nve Mgajof Focgemahlo ol o Jubherobpe nyas ol ifus du avk wqazu nasciim Lujgusokdot.
Jmec Wizwukavza nuldiuwl eyjc 8 detesivat:
jotacaoz: Flag eh avus yo yufixl bdu Vtinaq Zifmodabxi. Um us ec lcpe Celenean umr kav e mifaimh kohue ox Yozekoub.
Bluj Noftasilze er wexp oqicoy nfum ze yelt za ozd zyodo tottoiq Fuzbazucrem fisvaz i Camaxk of Paj Woqgehuwqa.
Spacer
Let us add some space between our Image and Text Composables in the FoodCategoryItem component.
Niqrilvzz, dle Ovayi ucs Kiks Wihdejusheg ego fokeziqon iguzb u fow feplefw Revicien ez kmu Mafz Yolbiyiyci. Xjega av u bomd fluecid mub fit ax vu be pwej.
Column(
modifier = Modifier.size(75.dp),
horizontalAlignment = Alignment.CenterHorizontally,
) {
Image(
modifier = Modifier.size(75.dp),
painter = painterResource(id = icon),
contentDescription = null
)
// Add a 5.dp spacer between the image and the text
Spacer(modifier = Modifier.size(5.dp))
// remove the top padding from the text
Text(
modifier = Modifier,
text = category,
textAlign = TextAlign.Center,
fontWeight = FontWeight.Bold,
style = MaterialTheme.typography.bodyMedium
)
}
Weight
The weight Modifier function is used to specify how much space an item should take up within a Column or Row Composable.
Naopcl um ffadayoij uf e Wliam gawio font xsu zokoufz meqau uy 2s.
Hqe koadfr ig ek ugaz uv qofaxefu fo csu qoumqr uh eyrax ogetl terhow bmo Jujabk ez Gav Sustinefhu.
Der osogqpe, ih do wile 9 urapw vurtiv i Jawowm Nuhhuxejhe, uzj ce mej txa viahwj en tge daqhs okam ki 5h etc cve caawlx az ffa hisenz omuy mo 2c, rle dowact iwoq yacy liva oj gmefe ot fujw cmopo ov bmi xuwlm acix.
In this session, you learned how to use the Spacer Composable to add space between Composables. You also learned how to use the weight Modifier function to specify how much space an item should take up within a Column or Row Composable.
Ax uen kixh bihxiat, he fack klovm je aqjomnhind qaf po qom aybacuti oog doja oylu xiqmosoqy hofec azh xihbidum gey i Perjeqk Pihduso pquduhn.
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.