{"id":45704,"date":"2021-11-19T19:46:18","date_gmt":"2021-11-19T10:46:18","guid":{"rendered":"https:\/\/www.charlezz.com\/?p=45704"},"modified":"2021-11-19T19:57:16","modified_gmt":"2021-11-19T10:57:16","slug":"jetpack-compose-theming-%eb%aa%a8%ec%96%91-%ec%9e%91%ec%97%85","status":"publish","type":"post","link":"https:\/\/charlezz.com\/?p=45704","title":{"rendered":"Jetpack Compose theming &#8211; \ubaa8\uc591 \uc791\uc5c5"},"content":{"rendered":"\n<p>\uceec\ub7ec\ub098 \uc11c\uccb4\uc640 \ub9c8\ucc2c\uac00\uc9c0\ub85c, \ubaa8\uc591(shape) \ud14c\ub9c8\ub97c \uc124\uc815\ud558\uba74 Material \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \ubc18\uc601\ub41c\ub2e4. \uc608\ub97c \ub4e4\uc5b4 Button\uc740 \uc791\uc740 \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \ub300\ud574 \uc124\uc815\ub41c \ubaa8\uc591\uc744 \uc120\ud0dd\ud55c\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@Composable<br>fun Button( ...<br>&nbsp; shape: Shape = MaterialTheme.shapes.small<br>) {<\/code><\/pre>\n\n\n\n<p>\uc0c9\uc0c1\uacfc \ub9c8\ucc2c\uac00\uc9c0\ub85c Material \ucef4\ud3ec\ub10c\ud2b8\ub294 \uae30\ubcf8 \ub9e4\uac1c\ubcc0\uc218\ub97c \uc0ac\uc6a9\ud558\ubbc0\ub85c, \ucef4\ud3ec\ub10c\ud2b8\uac00 \uc0ac\uc6a9\ud560 \ubaa8\uc591(shape)\uc758 \uce74\ud14c\uace0\ub9ac\ub97c \ud655\uc778\ud558\uac70\ub098 \ub300\uc548\uc744 \uc81c\uacf5\ud558\ub294 \uac83\uc774 \uac04\ub2e8\ud558\ub2e4. shape \uce74\ud14c\uace0\ub9ac\uc5d0 \ub300\ud55c \ucef4\ud3ec\ub10c\ud2b8 \uc804\uccb4\ub294 <a href=\"https:\/\/material.io\/design\/shape\/applying-shape-to-ui.html#shape-scheme\">\uacf5\uc2dd\ubb38\uc11c<\/a>\ub97c \ud655\uc778\ud558\uc790.<\/p>\n\n\n\n<p>\uc77c\ubd80 \ucef4\ud3ec\ub10c\ud2b8\ub294 \ucee8\ud14d\uc2a4\ud2b8\uc5d0 \ub9de\uac8c \uc218\uc815\ub41c \ud14c\ub9c8 shape\uc744 \uc0ac\uc6a9\ud55c\ub2e4. \uc608\ub97c \ub4e4\uc5b4 \uae30\ubcf8\uc801\uc73c\ub85c TextField\ub294 MaterialTheme.shapes.small \ud14c\ub9c8\ub97c \uc0ac\uc6a9\ud558\uc9c0\ub9cc, \uc544\ub798\ucabd \ubaa8\uc11c\ub9ac\uc5d0\ub294 \ubaa8\uc11c\ub9ac \ud06c\uae30\uac00 0dp\ub85c \uc801\uc6a9\ub41c\ub2e4. (\uc6d0\ub798\ub294 4dp)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@Composable<br>fun FilledTextField(<br>&nbsp; \/\/ other parameters<br>&nbsp; shape: Shape = MaterialTheme.shapes.small.copy(<br>&nbsp; &nbsp; bottomStart = ZeroCornerSize, \/\/ overrides small theme style<br>&nbsp; &nbsp; bottomEnd = ZeroCornerSize \/\/ overrides small theme style<br>&nbsp; )<br>) {<\/code><\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"304\" height=\"148\" src=\"https:\/\/www.charlezz.com\/wordpress\/wp-content\/uploads\/2021\/11\/www.charlezz.com-jetpack-compose-theming-62de8f5fd0a5fae9.png\" alt=\"\" class=\"wp-image-45705\" srcset=\"https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/11\/www.charlezz.com-jetpack-compose-theming-62de8f5fd0a5fae9.png 304w, https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/11\/www.charlezz.com-jetpack-compose-theming-62de8f5fd0a5fae9-300x146.png 300w\" sizes=\"(max-width: 304px) 100vw, 304px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\ud14c\ub9c8 \ubaa8\uc591<\/h2>\n\n\n\n<p>\ubb3c\ub860, \ucef4\ud3ec\uc800\ube14 \ub610\ub294 Modifier\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc790\uc2e0\ub9cc\uc758 \ucef4\ud3ec\ub10c\ud2b8\ub97c \ub9cc\ub4e4 \ub54c shape\uc744 \uc9c1\uc811 \uc0ac\uc6a9\ud560 \uc218 \uc788\ub2e4. \uc608\ub97c \ub4e4\uc5b4, Surface, Modifier.clip, Modifier.background, Modifier.border \ub4f1\uc774 \uc788\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@Composable<br>fun UserProfile(<br>&nbsp; ...<br>&nbsp; shape: Shape = MaterialTheme.shapes.medium<br>) {<br>&nbsp; Surface(shape = shape) {<br>&nbsp; &nbsp; ...<br>&nbsp; }<br>}<\/code><\/pre>\n\n\n\n<p>PostItem\uc5d0 \ud45c\uc2dc\ub418\ub294 \uc774\ubbf8\uc9c0\uc5d0 shape \ud14c\ub9c8\ub97c \ucd94\uac00\ud574\ubcf4\uc790. \uc67c\ucabd \uc0c1\ub2e8 \ubaa8\uc11c\ub9ac\ub97c \uc790\ub974\uae30 \uc704\ud574 clip Modifier\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud14c\ub9c8\uc758 shape small\uc744 \uc801\uc6a9\ud55c\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@Composable\nfun PostItem(...) {\n\u00a0 ...\n\u00a0 Image(\n\u00a0 \u00a0 painter = painterResource(post.imageThumbId),\n \u00a0  modifier = Modifier.clip(shape = MaterialTheme.shapes.small)\n\u00a0 )<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/developer.android.com\/codelabs\/jetpack-compose-theming\/img\/dd3c6c8a4a4917ff.png?hl=ko\" alt=\"dd3c6c8a4a4917ff.png\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\uceec\ub7ec\ub098 \uc11c\uccb4\uc640 \ub9c8\ucc2c\uac00\uc9c0\ub85c, \ubaa8\uc591(shape) \ud14c\ub9c8\ub97c \uc124\uc815\ud558\uba74 Material \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \ubc18\uc601\ub41c\ub2e4. \uc608\ub97c \ub4e4\uc5b4 Button\uc740 \uc791\uc740 \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \ub300\ud574 \uc124\uc815\ub41c \ubaa8\uc591\uc744 \uc120\ud0dd\ud55c\ub2e4. \uc0c9\uc0c1\uacfc \ub9c8\ucc2c\uac00\uc9c0\ub85c Material \ucef4\ud3ec\ub10c\ud2b8\ub294 \uae30\ubcf8 \ub9e4\uac1c\ubcc0\uc218\ub97c \uc0ac\uc6a9\ud558\ubbc0\ub85c, \ucef4\ud3ec\ub10c\ud2b8\uac00 \uc0ac\uc6a9\ud560 \ubaa8\uc591(shape)\uc758 \uce74\ud14c\uace0\ub9ac\ub97c \ud655\uc778\ud558\uac70\ub098 \ub300\uc548\uc744 \uc81c\uacf5\ud558\ub294 \uac83\uc774 \uac04\ub2e8\ud558\ub2e4. shape \uce74\ud14c\uace0\ub9ac\uc5d0 \ub300\ud55c \ucef4\ud3ec\ub10c\ud2b8 \uc804\uccb4\ub294 \uacf5\uc2dd\ubb38\uc11c\ub97c \ud655\uc778\ud558\uc790. \uc77c\ubd80 \ucef4\ud3ec\ub10c\ud2b8\ub294 \ucee8\ud14d\uc2a4\ud2b8\uc5d0 \ub9de\uac8c \uc218\uc815\ub41c \ud14c\ub9c8 shape\uc744 \uc0ac\uc6a9\ud55c\ub2e4. \uc608\ub97c [&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\/45704"}],"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=45704"}],"version-history":[{"count":3,"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts\/45704\/revisions"}],"predecessor-version":[{"id":45718,"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts\/45704\/revisions\/45718"}],"wp:attachment":[{"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=45704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=45704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=45704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}