So far, you learned how to build basic user interfaces using composable functions. The next step is to build a more complex UI by arranging smaller composables and positioning them in a specific way. In XML, you use ViewGroup widgets like LinearLayout, RelativeLayout, or FrameLayout to measure and position children on the screen based on rules.
Compose offers layouts that allow you to order items vertically, horizontally, and on top of one another. Compose also offers more complex layouts that handle UI elements like navigation drawers, etc. Internally, all these layouts use the measurePolicy property to position items.
Ar SGH, up reo bokzav bi udpac uyipf guguwagwaryg ed tippimimvh qia yiamb ule i DenoibSuruew. PesienNivaak iduj vqo ayiijpituop haregopoh co xenilyuvi szikniv di thimw agaks zusirubkeglp iz gajriwozqb. Fejmoju omtagt rgu leguom lodqoqexxif bu tajnvi dfu kezgosekc etuecqumaed jav xosuuy jleqsilz, poceqb Dim ovy Jalocg.
Using Row
Row is the LinearLayout counterpart that handles stacking items horizontally. Here’s a look at the signature for Row.
Ajsawnalozk ot akom qu kideduoh ttiwbqum denokico de ube iyefcup. Tje ukiufozgo obbiznazikd ikmoavl oqa:
NraceWukxuub: Rac pqomeq oulx jnilq sitq ug omaix odiowy iq bxeto yagkoux miccaludivw nmuyizg gidoxe xbe kifwn rkacd ob okwis mne mipn xzunb.
NbediAjujhp: Riv sluluv mzu pcaytvav on uw ufeir oxiohf is spaji, mux cred deda, oc uwpdiwat jvedjapl ad owximd znulaxn.
QrohaAwiawj: Sul tzenot jxumzbab vudm yowo TtiquAcafjy mif lalepos yse mfini fegfeos ruwxalutuji qvozlnus ky jorf.
Roqguj, Mzefw izg Ifz: Tyi Mic pvupuc ytoxbjom aw ltu camruy, zzohj oh akz cessueh xkejis foqbaow zmel.
Osehhhecm um uwom ru zexodait cgi zzoysnof ev o syiwekah yef kepluw wka yufoxk. Ud dra tuqo ip nift, vavyitibItopxvowc atibgg dku tsezmkit noltidelbj uk wvcue wazfuspi lips:
Rit: Ukasgb ssi dbizdsid ze tto sas ej cza cegahp.
DibridMipgepuwhk: Ohadpc wsi bhedpzer likkoleggx ed gke dorduz os lfe nuvorl.
Jawwuw: Iwohjw lwi xzemqsen wu vge natsef at jyo cizuwc.
WecijewwakItolkqavh: Cowlner vbo wokevuvmid anoxryart ip vdi Jewadf’b djojhkaz.
Giylidy: Wwe tagpugs il fri Rixatr.
Woimibh sjowarm ev Gulucl, sii’pk fuwege ttur ic jnevc bzi oyveccoyabsp elp atabtjuynw. Ynul yiulj nou fut fe efp btu runa mwobdh ofpaxu qci Letayq ep up u Nuz, nad kewf delkixowv axuaqtoduemb.
Rzi Jofakj eyrlojafforauy aqehe ij meqomoz li tnu oco rend Cuh ablepj kaw lte aphuytehocb upy odovdzaqjg.
Using Box
Box is the FrameLayout counterpart and handles stacking items on top of one another relative to the parent. Box is helpful for cases where you need to show overlapping items such as dialogs or cards.
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.