{"id":45495,"date":"2021-11-07T16:18:18","date_gmt":"2021-11-07T07:18:18","guid":{"rendered":"https:\/\/www.charlezz.com\/?p=45495"},"modified":"2021-11-12T16:33:38","modified_gmt":"2021-11-12T07:33:38","slug":"jetpack-compose-basics-%ec%84%b1%eb%8a%a5-%ec%a2%8b%ec%9d%80-%eb%aa%a9%eb%a1%9d-%eb%a7%8c%eb%93%a4%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/charlezz.com\/?p=45495","title":{"rendered":"Jetpack Compose basics &#8211; \uc131\ub2a5 \uc88b\uc740 \ubaa9\ub85d \ub9cc\ub4e4\uae30"},"content":{"rendered":"\n<p>\uc880 \ub354 \ud604\uc2e4\uc801\uc778 \uc774\ub984 \ubaa9\ub85d\uc744 \ub9cc\ub4e4\uc5b4\ubcf4\uc790! \uc9c0\uae08\uae4c\uc9c0\ub294 Column\uc5d0 \uc9c1\uc811\ub9cc\ub4e0 greeting \ud568\uc218\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc544\uc774\ud15c\uc744 2\uac1c\ub9cc \ub098\ud0c0\ub0c8\uc5c8\ub2e4. \ud558\uc9c0\ub9cc \ub9cc\uc57d 1000\uac1c \ub610\ub294 \uadf8 \uc774\uc0c1\uc744 \ub2e4\ub904\uc57c \ud55c\ub2e4\uba74 \uc5b4\ub5a8\uc9c0 \uc0c1\uc0c1\ud574\ubcf4\uc790.<\/p>\n\n\n\n<p>Greetings\uc5d0 \uc788\ub294 \ub9e4\uac1c\ubcc0\uc218 \uae30\ubcf8 \ubaa9\ub85d \uac12\uc744 \ubcc0\uacbd\ud558\uace0, \ubaa9\ub85d\uc758 \uc0ac\uc774\uc988 \ubc0f \ub0b4\uc6a9\uc744 \ub78c\ub2e4 \ud45c\ud604\uc2dd\uc73c\ub85c \ucc44\uc6b8 \uc218 \uc788\ub294 \ub2e4\ub978 \ubaa9\ub85d\uc744 \uc0ac\uc6a9\ud574\ubcf4\ub3c4\ub85d \ud558\uc790.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>names: List&lt;String> = List(1000) { \"$it\" }<\/code><\/pre>\n\n\n\n<p>\uc774 \ubaa9\ub85d\uc744 \uc0ac\uc6a9\ud558\uba74 1000\uac1c\uc758 greeting\uc744 \ub9cc\ub4e4 \uc218 \uc788\ub2e4. \uc774\uac83\uc740 \uc2ec\uc9c0\uc5b4 \ud55c \ud654\uba74\uc5d0 \ub2f4\uc9c0\ub3c4 \ubabb\ud55c\ub9cc\ud07c \ub9ce\ub2e4. \ubd84\uba85\uc774 \uc774\uac74 \ub9ac\uc18c\uc2a4 \ub0ad\ube44\uace0 \uc131\ub2a5\uc744 \uc800\ud574\ud558\ub294 \uc694\uc18c\ub2e4. \uc2e4\uc81c\ub85c \ud55c\ubc88 \uc5d0\ubbac\ub808\uc774\ud130\uc5d0\uc11c 1000\uac1c \ub610\ub294 \uadf8 \uc774\uc0c1\uc758 \uc544\uc774\ud15c\uc744 \uac16\ub294 \ucef4\ud3ec\uc800\ube14 \ud568\uc218\ub97c \uc2e4\ud589\ud574\ubcf4\uc790. \ub098\uc758 \uacbd\uc6b0 \ubaa9\ub85d\uc758 \uc544\uc774\ud15c \uac2f\uc218\ub97c 10000\uac1c \uc815\ub3c4\ub85c \uc124\uc815\ud558\ub2c8 \uac24\ub7ed\uc2dc z\ud3f4\ub4dc2\uc5d0\uc11c Out Of Memory Error\uac00 \ubc1c\uc0dd\ud588\ub2e4.<\/p>\n\n\n\n<p>\uc2a4\ud06c\ub864 \uac00\ub2a5\ud55c Column\uc744 \ubcf4\uc5ec\uc8fc\uae30 \uc704\ud574\uc11c \uc6b0\ub9ac\ub294 LazyColumn\uc744 \uc0ac\uc6a9\ud560 \uc218 \uc788\ub2e4. LazyColumn\uc740 \ud654\uba74\uc5d0 \ubcf4\uc774\ub294 \ud56d\ubaa9\ub9cc \ub80c\ub354\ub9c1\ud55c\ub2e4. \ud070 \ubaa9\ub85d\uc744 \ub80c\ub354\ub9c1\ud560 \ub54c \uc131\ub2a5\uce21\uba74\uc5d0\uc11c \uc774\uc810\uc774 \uc788\ub2e4.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>Note:\u00a0<code>LazyColumn<\/code>\u00a0\uacfc\u00a0<code>LazyRow<\/code>\u00a0\ub294 \uc548\ub4dc\ub85c\uc774\ub4dc View\ub85c \uce58\uba74 <code>RecyclerView<\/code>\uc640 \ub3d9\ub4f1\ud55c \uac1c\ub150\uc774\ub2e4.<\/p><\/blockquote>\n\n\n\n<p>\uc77c\ubc18\uc801\uc778 \uc6a9\ubc95\uc5d0\uc11c LazyColumn API\ub294 \uc790\uc2e0\uc758 \ucf54\ub4dc \ube14\ub7ed\ub0b4\uc5d0\uc11c items \ud568\uc218\ub97c \uc81c\uacf5\ud55c\ub2e4. \uc774\ub97c \ud1b5\ud574 \uac1c\ubcc4\ud56d\ubaa9\ub4e4\uc774 \uc791\uc131\ud55c \ucf54\ub4dc \ub85c\uc9c1\uc744 \ub530\ub77c \ub80c\ub354\ub9c1 \ub420 \uc218 \uc788\ub3c4\ub85d \ud55c\ub2e4. \uc608\uc81c\ucf54\ub4dc\ub97c \uc0b4\ud3b4\ubcf4\uc790.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@Composable<br>private fun Greetings(names: List&lt;String&gt; = List(1000) { \"$it\" } ) {<br>&nbsp; &nbsp; LazyColumn(modifier = Modifier.padding(vertical = 4.dp)) {<br>&nbsp; &nbsp; &nbsp; &nbsp; items(items = names) { name -&gt;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Greeting(name = name)<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br>}<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><strong>Note:<\/strong>\u00a0import\uc2dc \ud328\ud0a4\uc9c0\uac00 <code>androidx.compose.foundation.lazy.items<\/code> \uc778\uc9c0 \ud655\uc778\ud558\uc790. <\/p><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote\"><p><strong>Note:\u00a0<\/strong><code>LazyColumn<\/code>\u00a0\uc740 RecyclerView\ucc98\ub7fc \ud558\uc704 \ud56d\ubaa9\uc744 \uc7ac\uc0ac\uc6a9\ud558\uc9c0 \uc54a\ub294\ub2e4. \ub300\uc2e0 \uc2a4\ud06c\ub864\uc744 \ub530\ub77c \uc0c8\ub85c\uc6b4 Composable \uac1d\uccb4\ub97c \ubc1c\ud589\ud55c\ub2e4. \uc131\ub2a5\uc801\uc73c\ub85c \uc88b\uace0, \uc548\ub4dc\ub85c\uc774\ub4dc <code>Views<\/code>\ub97c \ucd08\uae30\ud654\ud558\ub294 \uac83\ubcf4\ub2e4 \uc0c1\ub300\uc801\uc73c\ub85c \ube44\uc6a9\uc774 \uc801\ub2e4.<\/p><\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"320\" height=\"569\" src=\"https:\/\/www.charlezz.com\/wordpress\/wp-content\/uploads\/2021\/11\/www.charlezz.com-jetpack-compose-basics-487ca9093596fc6c.gif\" alt=\"\" class=\"wp-image-45496\"\/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc880 \ub354 \ud604\uc2e4\uc801\uc778 \uc774\ub984 \ubaa9\ub85d\uc744 \ub9cc\ub4e4\uc5b4\ubcf4\uc790! \uc9c0\uae08\uae4c\uc9c0\ub294 Column\uc5d0 \uc9c1\uc811\ub9cc\ub4e0 greeting \ud568\uc218\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc544\uc774\ud15c\uc744 2\uac1c\ub9cc \ub098\ud0c0\ub0c8\uc5c8\ub2e4. \ud558\uc9c0\ub9cc \ub9cc\uc57d 1000\uac1c \ub610\ub294 \uadf8 \uc774\uc0c1\uc744 \ub2e4\ub904\uc57c \ud55c\ub2e4\uba74 \uc5b4\ub5a8\uc9c0 \uc0c1\uc0c1\ud574\ubcf4\uc790. Greetings\uc5d0 \uc788\ub294 \ub9e4\uac1c\ubcc0\uc218 \uae30\ubcf8 \ubaa9\ub85d \uac12\uc744 \ubcc0\uacbd\ud558\uace0, \ubaa9\ub85d\uc758 \uc0ac\uc774\uc988 \ubc0f \ub0b4\uc6a9\uc744 \ub78c\ub2e4 \ud45c\ud604\uc2dd\uc73c\ub85c \ucc44\uc6b8 \uc218 \uc788\ub294 \ub2e4\ub978 \ubaa9\ub85d\uc744 \uc0ac\uc6a9\ud574\ubcf4\ub3c4\ub85d \ud558\uc790. \uc774 \ubaa9\ub85d\uc744 \uc0ac\uc6a9\ud558\uba74 1000\uac1c\uc758 greeting\uc744 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[38],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts\/45495"}],"collection":[{"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=45495"}],"version-history":[{"count":1,"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts\/45495\/revisions"}],"predecessor-version":[{"id":45497,"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts\/45495\/revisions\/45497"}],"wp:attachment":[{"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=45495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=45495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=45495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}