{"id":29013,"date":"2019-11-12T10:39:50","date_gmt":"2019-11-12T01:39:50","guid":{"rendered":"https:\/\/www.charlezz.com\/?p=29013"},"modified":"2019-11-12T15:00:50","modified_gmt":"2019-11-12T06:00:50","slug":"android%ec%97%90%ec%84%9c-view%ec%9d%98-%ec%88%98%eb%aa%85%ec%a3%bc%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/charlezz.com\/?p=29013","title":{"rendered":"Android\uc5d0\uc11c View\uc758\u00a0\uc0dd\uba85\uc8fc\uae30"},"content":{"rendered":"<p>https:\/\/proandroiddev.com\/the-life-cycle-of-a-view-in-android-6a2c4665b95e\uc744 \ubc88\uc5ed\ud55c \ub0b4\uc6a9\uc785\ub2c8\ub2e4.<\/p>\n<hr \/>\n<p name=\"9c21\" class=\"graf graf--p\">\uc548\ub4dc\ub85c\uc774\ub4dc \uc571\uc744 \uc2e4\ud589\ud560 \ub54c \uc6b0\ub9ac\uac00 \uac00\uc7a5 \uba3c\uc800 \uc2a4\ud06c\ub9b0\uc5d0\uc11c \ubcfc \uc218 \uc788\ub294 \uac83\uc774 View\ub77c\uace0 \ub9d0\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p name=\"b194\" class=\"graf graf--p\"><strong class=\"markup--strong markup--p-strong\">View<\/strong> \ud074\ub798\uc2a4\ub294 <strong class=\"markup--strong markup--p-strong\">\uc0ac\uc6a9\uc790 \uc778\ud130\ud398\uc774\uc2a4<\/strong> \uae30\ubcf8\uc801\uc778 \uad6c\uc131 \uc694\uc18c\ub97c \uac00\uc9c0\uace0 \uc788\ub2e4. \uc608\ub97c\ub4e4\uc5b4 \uc2a4\ud06c\ub9b0\uc704 \uc0ac\uac01\ud615 \uc601\uc5ed\uc5d0\uc11c <strong class=\"markup--strong markup--p-strong\">\uadf8\ub9ac\uae30<\/strong> \ubc0f <strong class=\"markup--strong markup--p-strong\">\uc774\ubca4\ud2b8 \ucc98\ub9ac<\/strong> \uac19\uc740 \uc791\uc5c5\uc774<strong class=\"markup--strong markup--p-strong\"> <\/strong>View\ub97c \ud1b5\ud574 \uc774\ub8e8\uc5b4\uc9c4\ub2e4. View\ub294 Button, TextView, ImageView \ub4f1\uc758 \uc704\uc82f\uc744 \uc791\uc131\ud558\ub294 \ub370 \uc0ac\uc6a9\ub418\ub294 \uae30\ubcf8 \ud074\ub798\uc2a4\u00a0. View\uc758 \ub610 \ub2e4\ub978 \uc11c\ube0c\ud074\ub798\uc2a4\uc778 <strong class=\"markup--strong markup--p-strong\">ViewGroup<\/strong>\uc740 \ubcf4\uc774\uc9c0\ub294 \uc54a\ub294 \ucee8\ud14c\uc774\ub108\ub85c\uc368 \ub2e4\ub978 View\ub4e4\uc744 \ub2e4\ub978 View(\ub610\ub294 \ub2e4\ub978 ViewGroup)\ub4e4\uc744 \ud3ec\ud568 \ud560 \uc218 \uc788\ub2e4.<\/p>\n<figure name=\"554e\" class=\"graf graf--figure\"><img decoding=\"async\" class=\"graf-image\" data-image-id=\"1*HApOQUK3-G7X9wU50GF49A.png\" data-width=\"583\" data-height=\"480\" data-is-featured=\"true\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1600\/1*HApOQUK3-G7X9wU50GF49A.png\" \/><\/figure>\n<h3 name=\"57cc\" class=\"graf graf--h3\">View\uc758 \uc0dd\uba85\uc8fc\uae30<\/h3>\n<p name=\"566b\" class=\"graf graf--p\">\ubaa8\ub4e0 \uc561\ud2f0\ube44\ud2f0\ub294 \uc0dd\uba85\uc8fc\uae30\ub97c \uac00\uc9c0\uace0 \uc788\ub294\ub370, View\ub3c4 \uc0dd\uba85\uc8fc\uae30\ub97c \uac00\uc9c0\uace0 \uc788\ub2e4. \ud654\uba74\uc5d0 \ub80c\ub354\ub9c1 \ub41c View\ub294 \ub2e4\uc74c \uadf8\ub9bc\uacfc \uac19\uc740 \uc0dd\uba85\uc8fc\uae30 \uba54\uc11c\ub4dc\ub97c \uac70\uccd0 \ud654\uba74\uc5d0 \uadf8\ub824\uc9c4\ub2e4. \uac01 \uba54\uc11c\ub4dc\uc5d0\ub294 \uc911\uc694\ud55c \uc758\ubbf8\uac00 \uc788\ub2e4. \uc0dd\uba85\uc8fc\uae30\uc5d0 \ub300\ud574\uc11c \uc54c\uc544\ubcf4\uc790.<\/p>\n<figure name=\"1290\" class=\"graf graf--figure\"><img decoding=\"async\" class=\"graf-image\" data-image-id=\"1*hKqtBgx594fylFgX-jMDQA.png\" data-width=\"1365\" data-height=\"1179\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1600\/1*hKqtBgx594fylFgX-jMDQA.png\" \/><\/figure>\n<h3 name=\"7d5a\" class=\"graf graf--h3\">\uc0dd\uc131\uc790(Constructors)<\/h3>\n<p name=\"529c\" class=\"graf graf--p\">\ubcf4\ud1b5 Custom View\ub97c \ub9cc\ub4e4 \ub54c \uc5b4\ub5a4 \uc0dd\uc131\uc790\ub97c \uad6c\ud604 \ud558\ub294\uc9c0 \ud63c\ub780\uc2a4\ub7fd\ub2e4.<\/p>\n<pre name=\"b83e\" class=\"graf graf--pre\">View(Context context) <\/pre>\n<pre name=\"70ed\" class=\"graf graf--pre\">View(Context context, @Nullable AttributeSet attrs) <\/pre>\n<pre name=\"2236\" class=\"graf graf--pre\">View(Context context, @Nullable AttributeSet attrs, int defStyleAttr) <\/pre>\n<pre name=\"3179\" class=\"graf graf--pre\">View(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes)<\/pre>\n<h4 name=\"a0cc\" class=\"graf graf--h4\"><strong class=\"markup--strong markup--h4-strong\">View(Context context)<\/strong><\/h4>\n<p name=\"3ea2\" class=\"graf graf--p\">\ucf54\ub4dc\uc5d0\uc11c View\ub97c \ub3d9\uc801\uc73c\ub85c \ub9cc\ub4e4 \ub54c \uc0ac\uc6a9\ud558\ub294 \uac04\ub2e8\ud55c \uc0dd\uc131\uc790\ub2e4. \uc5ec\uae30\uc11c \ub9e4\uac1c \ubcc0\uc218 context\ub294 \ubdf0\uac00 \uc2e4\ud589\ub420 \ub54c \ud604\uc7ac \ud14c\ub9c8, \ub9ac\uc18c\uc2a4 \ub4f1\uc744 \uad6c\uc131\ud558\ub294\ub370 \uc0ac\uc6a9\ub41c\ub2e4.<\/p>\n<h4 name=\"1976\" class=\"graf graf--h4\">View(Context context, @Nullable AttributeSet attrs)<\/h4>\n<p name=\"647f\" class=\"graf graf--p\">XML\uc5d0\uc11c View\ub97c \uc804\uac1c(Inflation) \ud560 \ub54c \ud638\ucd9c\ub418\ub294 \uc0dd\uc131\uc790\ub85c, XML \ud30c\uc77c\uc5d0\uc11c \uc9c0\uc815\ub41c \uc18d\uc131\uc744 \uc81c\uacf5\ud558\uc5ec XML \ud30c\uc77c\uc5d0\uc11c View\ub97c \uad6c\uc131 \ud560 \ub54c \ud638\ucd9c\ub41c\ub2e4. \uc774 \uc0dd\uc131\uc790\ub294 \uae30\ubcf8 \uc2a4\ud0c0\uc77c\uc778 0\uc744 \uc0ac\uc6a9\ud558\ubbc0\ub85c \ucee8\ud14d\uc2a4\ud2b8\uc758 \ud14c\ub9c8 \ubc0f \uc9c0\uc815\ub41c AttributeSet\uc758 \uc18d\uc131 \uac12\ub9cc \uc801\uc6a9\ub41c\ub2e4.<\/p>\n<h4 name=\"6a30\" class=\"graf graf--h4\">View(Context context, <a href=\"http:\/\/twitter.com\/Nullable\" data-href=\"http:\/\/twitter.com\/Nullable\" class=\"markup--anchor markup--h4-anchor\" title=\"Twitter profile for @Nullable\" rel=\"noopener noreferrer\" target=\"_blank\">@Nullable<\/a> AttributeSet attrs, int defStyleAttr)<\/h4>\n<p name=\"d9c3\" class=\"graf graf--p\">XML\uc744 \ud1b5\ud574 \uc804\uac1c\ub97c \ud558\uace0 \ud14c\ub9c8 \uc18d\uc131\uc5d0\uc11c \ud074\ub798\uc2a4\ubcc4 \uae30\ubcf8 \uc2a4\ud0c0\uc77c\uc744 \uc801\uc6a9\ud55c\ub2e4. \uc774 View \uc0dd\uc131\uc790\ub294 \uc11c\ube0c \ud074\ub798\uc2a4\uac00 \uc804\uac1c\ud560 \ub54c \uc790\uccb4 \uae30\ubcf8 \uc2a4\ud0c0\uc77c\uc744 \uc0ac\uc6a9\ud560 \uc218 \uc788\ub3c4\ub85d \ud55c\ub2e4. \uc608\ub97c \ub4e4\uc5b4, Button \ud074\ub798\uc2a4\uc758 \uc0dd\uc131\uc790\ub294 \uc218\ud37c \ud074\ub798\uc2a4 \uc0dd\uc131\uc790\ub97c \ud638\ucd9c\ud558\uace0 defStyleAttr\uc5d0 R.attr.buttonStyle\uc744 \uc81c\uacf5\ud55c\ub2e4. \uc774\ub97c \ud1b5\ud574 \ud14c\ub9c8\uc758 \ubc84\ud2bc \uc2a4\ud0c0\uc77c\uc740 \ubaa8\ub4e0 \uae30\ubcf8 View \uc18d\uc131 (\ud2b9\ud788 \ubc30\uacbd)\uacfc Button \ud074\ub798\uc2a4\uc758 \uc18d\uc131\uc744 \uc218\uc815\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p name=\"3d7d\" class=\"graf graf--p\">defStyleAttr \ub9e4\uac1c \ubcc0\uc218\ub294 View\uc758 \uae30\ubcf8\uac12\uc744 \uc81c\uacf5\ud558\ub294 Style \ub9ac\uc18c\uc2a4 \ub300\ud55c \ucc38\uc870\ub97c \ud3ec\ud568\ud558\ub294 \ud604\uc7ac \ud14c\ub9c8\uc758 \uc18d\uc131\uc774\ub2e4. \uae30\ubcf8\uac12\uc744 \ucc3e\uc9c0 \uc54a\uc73c\ub824\uba74 0\uc73c\ub85c \uc9c0\uc815\ud560 \uc218 \uc788\ub2e4.<\/p>\n<h4 name=\"114f\" class=\"graf graf--h4\">View(Context context, <a href=\"http:\/\/twitter.com\/Nullable\" data-href=\"http:\/\/twitter.com\/Nullable\" class=\"markup--anchor markup--h4-anchor\" title=\"Twitter profile for @Nullable\" rel=\"noopener noreferrer\" target=\"_blank\">@Nullable<\/a> AttributeSet attrs, int defStyleAttr, int defStyleRes)<\/h4>\n<p name=\"7af8\" class=\"graf graf--p\">XML\uc744 \uc804\uac1c\ud558\uace0 \ud14c\ub9c8 \uc18d\uc131 \ub610\ub294 Style \ub9ac\uc18c\uc2a4\uc5d0\uc11c \ud074\ub798\uc2a4 \ubcc4 \uae30\ubcf8 \uc2a4\ud0c0\uc77c\uc744 \uc801\uc6a9\ud55c\ub2e4. \uc774 \uc0dd\uc131\uc790\ub294 \uc11c\ube0c \ud074\ub798\uc2a4\uac00 \uc804\uac1c\ud560 \ub54c \uc790\uccb4 \uae30\ubcf8 \uc2a4\ud0c0\uc77c\uc744 \uc0ac\uc6a9\ud560 \uc218 \uc788\ub3c4\ub85d\ud55c\ub2e4. \uc704\uc640 \uc720\uc0ac\ud558\ub2e4.<\/p>\n<p name=\"ac24\" class=\"graf graf--p\">\ub9e4\uac1c\ubcc0\uc218 defStyleRes\ub294 View\uc758 defStyleAttr\uac00 0\uc774\uac70\ub098 \ud14c\ub9c8\uc5d0\uc11c \ucc3e\uc744 \uc218 \uc5c6\ub294 \uacbd\uc6b0\uc5d0\ub9cc \uae30\ubcf8\uac12\uc744 \uc81c\uacf5\ud558\ub294 Style \ub9ac\uc18c\uc2a4 ID\ub2e4. \uae30\ubcf8\uac12\uc744 \ucc3e\uc9c0 \uc54a\uc73c\ub824\uba74 0 \uc73c\ub85c \uc9c0\uc815\ud55c\ub2e4.<\/p>\n<h3 name=\"abec\" class=\"graf graf--h3\">Attachment \/ Detachment<\/h3>\n<p name=\"a9d4\" class=\"graf graf--p\">View\uac00 Window\uc5d0\uc11c \uc5f0\uacb0\ub418\uac70\ub098 \ubd84\ub9ac \ub420 \ub54c\uc758 \ub2e8\uacc4\ub2e4. \uc774 \ub2e8\uacc4\uc5d0\ub294 \uc801\uc808\ud55c \uc791\uc5c5\uc744 \uc218\ud589\ud558\uae30 \uc704\ud574 \ucf5c\ubc31\uc744 \ubc1b\ub294 \uba87 \uac00\uc9c0 \ubc29\ubc95\uc774 \uc788\ub2e4.<\/p>\n<h4 name=\"54df\" class=\"graf graf--h4\"><strong class=\"markup--strong markup--h4-strong\">onAttachedToWindow()<\/strong><\/h4>\n<p name=\"ae13\" class=\"graf graf--p\">View\uac00 Window\uc5d0 \uc5f0\uacb0\ub418\uba74 \ud638\ucd9c\ub41c\ub2e4. View\uac00 \ud65c\uc131\ud654 \ub420 \uc218 \uc788\uace0, \ub4dc\ub85c\uc789 \ud560 \ud45c\uba74\uc774 \uc788\uc74c\uc744 \uc54c\uace0\uc788\ub294 \ub2e8\uacc4\ub2e4. \ub530\ub77c\uc11c \ub9ac\uc18c\uc2a4 \ud560\ub2f9\uc744 \uc2dc\uc791\ud558\uac70\ub098 \ub9ac\uc2a4\ub108\ub97c \uc124\uc815\ud560 \uc218 \uc788\ub2e4.<\/p>\n<h4 name=\"d6bb\" class=\"graf graf--h4\">onDetachedFromWindow()<\/h4>\n<p name=\"6a42\" class=\"graf graf--p\">View\uac00 Window\uc5d0\uc11c \ubd84\ub9ac \ub420 \ub54c \ud638\ucd9c\ub41c\ub2e4. \uc774 \uc2dc\uc810\uc5d0\uc11c \ub354 \uc774\uc0c1 \ub4dc\ub85c\uc789\uc744 \ud560 \ud45c\uba74\uc774 \uc5c6\ub2e4. \uc608\uc57d \ub41c \uc790\uc6d0\uc744 \uc815\ub9ac\ud558\uac70\ub098 \uc815\ub9ac\ud558\ub294 \ubaa8\ub4e0 \uc885\ub958\uc758 \uc791\uc5c5\uc744 \uc911\uc9c0\ud574\uc57c\ud558\ub294 \uacf3\ub514\ub2e4. \uc774 \uba54\uc18c\ub4dc\ub294 ViewGroup\uc5d0\uc11c View\uc81c\uac70\ub97c \ud638\ucd9c\ud558\uac70\ub098 \uc561\ud2f0\ube44\ud2f0\uac00 Destroyed \ub420 \ub54c \ud638\ucd9c\ub41c\ub2e4.<\/p>\n<h4 name=\"dec3\" class=\"graf graf--h4\">onFinishInflate()<\/h4>\n<p name=\"f632\" class=\"graf graf--p\">\uc774 \uba54\uc18c\ub4dc\ub294 View\uac00 \uc804\uac1c\uac00 \ub05d\ub0a0 \ub54c \ud638\ucd9c\ub41c\ub2e4. \ub808\uc774\uc544\uc6c3\uc758 \uacbd\uc6b0 \ubaa8\ub4e0 Child View\uac00 \ucd94\uac00 \ub41c \ud6c4\uc5d0 \ud638\ucd9c\ub41c\ub2e4.<\/p>\n<h3 name=\"1ec4\" class=\"graf graf--h3\">\uc21c\ud68c(Traversals)<\/h3>\n<p name=\"be01\" class=\"graf graf--p\">View \uacc4\uce35 \uad6c\uc870\ub294 \ubd80\ubaa8 \ub178\ub4dc (ViewGroup)\uc5d0\uc11c \ubd84\uae30\uac00\uc788\ub294 \ub9ac\ud504 \ub178\ub4dc (Child Views)\uc758 \ud2b8\ub9ac \uad6c\uc870\uc640 \uac19\uae30 \ub54c\ubb38\uc5d0 \uc21c\ud68c \ub2e8\uacc4\ub77c\uace0 \ud55c\ub2e4. \ub530\ub77c\uc11c \uac01 \uba54\uc18c\ub4dc\ub294 \ubd80\ubaa8\uc5d0\uc11c \uc2dc\uc791\ud558\uc5ec \ub9c8\uc9c0\ub9c9 \ub178\ub4dc\uae4c\uc9c0 \uc21c\ud68c\ud558\uc5ec \uc81c\uc57d \uc870\uac74\uc744 \uc815\uc758\ud55c\ub2e4.<\/p>\n<figure name=\"7b9d\" class=\"graf graf--figure\"><img decoding=\"async\" class=\"graf-image\" data-image-id=\"1*aWS48PfoysD-VOqQPu-9nQ.png\" data-width=\"516\" data-height=\"716\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1600\/1*aWS48PfoysD-VOqQPu-9nQ.png\" \/><\/figure>\n<figure name=\"30fa\" class=\"graf graf--figure\"><img decoding=\"async\" class=\"graf-image\" data-image-id=\"1*H2nQpONvkN_xpyKlIkirqQ.png\" data-width=\"1852\" data-height=\"232\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1600\/1*H2nQpONvkN_xpyKlIkirqQ.png\" \/><\/figure>\n<p name=\"35c0\" class=\"graf graf--p\">Measure \ub2e8\uacc4\uc640 Layout \ub2e8\uacc4\ub294 \ud56d\uc0c1 \uc704\uc640 \uac19\uc774 \uc21c\ucc28\uc801\uc73c\ub85c \uc9c4\ud589\ub41c\ub2e4.<\/p>\n<h4 name=\"2f0f\" class=\"graf graf--h4\">onMeasure()<\/h4>\n<p name=\"6721\" class=\"graf graf--p\">View\uc758 \ud06c\uae30\ub97c \ud655\uc778\ud558\uae30 \uc704\ud574 \ud638\ucd9c\ub429\ub2c8\ub2e4. ViewGroup\uc758 \uacbd\uc6b0 \uacc4\uc18d\ud574\uc11c \uac01 Child view\uc5d0 \ub300\ud55c \uce21\uc815\uc744 \ud558\uace0, \uadf8\uc5d0 \ub300\ud55c \uacb0\uacfc\ub85c \uc790\uc2e0\uc758 \uc0ac\uc774\uc988\ub97c \uacb0\uc815\ud55c\ub2e4.<\/p>\n<pre name=\"0523\" class=\"graf graf--pre\"><strong class=\"markup--strong markup--pre-strong\">onMeasure<\/strong>(int widthMeasureSpec, int heightMeasureSpec)<\/pre>\n<pre name=\"a188\" class=\"graf graf--pre\"><strong class=\"markup--strong markup--pre-strong\"><em class=\"markup--em markup--pre-em\">@param <\/em><\/strong><em class=\"markup--em markup--pre-em\">widthMeasureSpec \ubd80\ubaa8\ubdf0\uc5d0 \uc758\ud574 \uc801\uc6a9\ub41c \uc218\ud3c9 \uacf5\uac04 \uc694\uad6c\uc0ac\ud56d<\/em><\/pre>\n<pre name=\"9997\" class=\"graf graf--pre\"><strong class=\"markup--strong markup--pre-strong\"><em class=\"markup--em markup--pre-em\">@param <\/em><\/strong><em class=\"markup--em markup--pre-em\">heightMeasureSpec \ubd80\ubaa8\ubdf0\uc5d0 \uc758\ud574 \uc801\uc6a9\ub41c \uc218\uc9c1 \uacf5\uac04 \uc694\uad6c\uc0ac\ud56d<\/em><\/pre>\n<p name=\"cda0\" class=\"graf graf--p\">onMeasure ()\ub294 \uac12\uc744 \ubc18\ud658\ud558\uc9c0 \uc54a\uace0, setMeasuredDimension()\uc744 \ud638\ucd9c\ud558\uc5ec \ub108\ube44\uc640 \ub192\uc774\ub97c \uba85\uc2dc\uc801\uc73c\ub85c \uc124\uc815\ud55c\ub2e4.<\/p>\n<h4 name=\"d646\" class=\"graf graf--h4\">MeasureSpec<\/h4>\n<p name=\"13ce\" class=\"graf graf--p\">MeasureSpec\uc740 \ubd80\ubaa8\uc5d0\uc11c \uc790\uc2dd\uc73c\ub85c \uc804\ub2ec\ub418\ub294 \ub808\uc774\uc544\uc6c3 \uc694\uad6c \uc0ac\ud56d\uc744 \ucea1\uc290\ud654\ud55c\ub2e4. \uac01 MeasureSpec\uc740 \ub108\ube44 \ub610\ub294 \ub192\uc774\uc5d0 \ub300\ud55c \uc694\uad6c \uc0ac\ud56d\uc744 \ub098\ud0c0\ub0b8\ub2e4. MeasureSpec\uc740 \ud06c\uae30\uc640 \ubaa8\ub4dc\ub85c \uad6c\uc131\ub418\uba70, \uc138 \uac00\uc9c0 \ubaa8\ub4dc\uac00 \uc788\ub2e4.<\/p>\n<p name=\"e928\" class=\"graf graf--p\"><strong class=\"markup--strong markup--p-strong\">MeasureSpec.EXACTLY<\/strong>\u00a0: \ubd80\ubaa8\ubdf0\uac00 \uc790\uc2dd\ubdf0\uc758 \uc815\ud655\ud55c \ud06c\uae30\ub97c \uacb0\uc815\ud55c\ub2e4. \uc790\uc2dd\ubdf0\uc758 \uc0ac\uc774\uc988\uc640 \uad00\uacc4\uc5c6\uc774 \uc8fc\uc5b4\uc9c4 \uacbd\uacc4\ub0b4\uc5d0\uc11c \uc0ac\uc774\uc988\uac00 \uacb0\uc815\ub41c\ub2e4.<\/p>\n<p name=\"9611\" class=\"graf graf--p\"><strong class=\"markup--strong markup--p-strong\">MeasureSpec.AT_MOST<\/strong>\u00a0: \uc790\uc2dd\ubdf0\ub294 \uc9c0\uc815\ub41c \ud06c\uae30\uae4c\uc9c0 \uc6d0\ud558\ub294 \ub9cc\ud07c \ucee4\uc9c8 \uc218 \uc788\ub2e4.<\/p>\n<p name=\"cac7\" class=\"graf graf--p\"><strong class=\"markup--strong markup--p-strong\">MeasureSpec.UNSPECIFIED<\/strong>\u00a0: \ubd80\ubaa8\ubdf0\uac00 \uc790\uc2dd\ubdf0\uc5d0 \uc81c\ud55c\uc744 \ub450\uc9c0 \uc54a\uae30 \ub54c\ubb38\uc5d0, \uc790\uc2dd\ubdf0\ub294 \uc6d0\ud558\ub294 \ud06c\uae30\uac00 \ub420 \uc218 \uc788\ub2e4.<\/p>\n<h4 name=\"c16d\" class=\"graf graf--h4\">onLayout()<\/h4>\n<p name=\"957b\" class=\"graf graf--p\">\ubdf0\ub97c \uce21\uc815\ud558\uc5ec \ud654\uba74\uc5d0 \ubc30\uce58 \ud55c \ud6c4\uc5d0 \ud638\ucd9c\ub41c\ub2e4.<\/p>\n<h4 name=\"18fb\" class=\"graf graf--h4\">onDraw()<\/h4>\n<p name=\"ec35\" class=\"graf graf--p\">\ud06c\uae30\uc640 \uc704\uce58\ub294 \uc774\uc804 \ub2e8\uacc4\uc5d0\uc11c \uacc4\uc0b0\ub418\ubbc0\ub85c View\ub294 \uadf8\uac83\ub4e4\uc744 \uae30\uc900\uc73c\ub85c \uadf8\ub9b4 \uc218 \uc788\uc2b5\ub2c8\ub2e4. onDraw(Canvas) \uba54\uc11c\ub4dc\uc5d0\uc11c \uc0dd\uc131\ub41c \uce94\ubc84\uc2a4 \uac1d\uccb4\uc5d0\ub294 GPU\ub85c \ubcf4\ub0bc OpenGL-ES \uba85\ub839\ubaa9\ub85d(displayList)\uc774 \uc788\ub2e4. onDraw()\ub294 \uc5ec\ub7ec\ubc88 \ud638\ucd9c\ub418\ubbc0\ub85c \uc774\uc774\uacf3\uc5d0\uc11c\uac1d\uccb4\ub97c \ub9cc\ub4e4\uba74 \uc548\ub41c\ub2e4.<\/p>\n<p name=\"26d9\" class=\"graf graf--p\">\ud2b9\uc815 \ubdf0\uc758 \uc18d\uc131\uc774 \ubcc0\uacbd\ub418\uc5c8\uc744 \ub54c \uc2e4\ud589\ub418\ub294 \ub450 \uac00\uc9c0 \uba54\uc11c\ub4dc\uac00 \uc788\ub2e4(invalidate(), requestLayout())<\/p>\n<h4 name=\"9ede\" class=\"graf graf--h4\">invalidate()<\/h4>\n<p name=\"3c32\" class=\"graf graf--p\">invalidate ()\ub294 \ubcc0\uacbd \uc0ac\ud56d\uc744 \ubcf4\uc5ec\uc8fc\uace0\uc790 \ud558\ub294 \ud2b9\uc815\ubdf0\uc5d0 \ub300\ud574 \uac15\uc81c\ub85c \ub2e4\uc2dc \uadf8\ub9ac\uae30\ub97c \uc694\uad6c\ud558\ub294 \uba54\uc18c\ub4dc\uc774\ub2e4. \ubdf0 \ubaa8\uc591\uc774 \ubcc0\uacbd\ub418\uba74 invalidate()\ub97c \ud638\ucd9c\ud574\uc57c\ud55c\ub2e4\uace0 \uac04\ub2e8\ud788 \ub9d0\ud560 \uc218 \uc788\ub2e4.<\/p>\n<h4 name=\"27b6\" class=\"graf graf--h4\">requestLayout()<\/h4>\n<p name=\"c1de\" class=\"graf graf--p\">\uc5b4\ub5a4 \uc2dc\uc810\uc5d0\uc11c \ubdf0\uc758 \uacbd\uacc4\uac00 \ubcc0\uacbd\ub418\uc5c8\ub2e4\uba74, View\ub97c \ub2e4\uc2dc \uce21\uc815\ud558\uae30 \uc704\ud574 requestLayout()\uc744 \ud638\ucd9c\ud558\uc5ec Measure\ubc0f Layout \ub2e8\uacc4\ub97c \ub2e4\uc2dc \uac70\uce60 \uc218 \uc788\ub2e4.<\/p>\n<blockquote name=\"e988\" class=\"graf graf--blockquote graf--hasDropCapModel\">\n<p>View\uc5d0\uc11c \uba54\uc18c\ub4dc\ub97c \ud638\ucd9c \ud560 \ub54c\ub294 \ud56d\uc0c1 UI \uc2a4\ub808\ub4dc\ub0b4\uc5d0\uc11c \uc218\ud589\ud574\uc57c\ud55c\ub2e4. \ub2e4\ub978 \uc2a4\ub808\ub4dc\uc5d0\uc11c \uc791\uc5c5\ud558\uace0 \uc788\uace0, \ud574\ub2f9 \uc2a4\ub808\ub4dc\uc5d0\uc11c View\uc758\uc0c1\ud0dc\ub97c \uc5c5\ub370\uc774\ud2b8 \ud558\ub824\ub294 \uacbd\uc6b0 \ud578\ub4e4\ub7ec\ub97c \uc0ac\uc6a9\ud574\uc57c\ud55c\ub2e4.<\/p>\n<\/blockquote>\n<h3 name=\"900c\" class=\"graf graf--h3\">\uc0c1\ud0dc\uc758 \uc800\uc7a5\uacfc \ubcf5\uad6c(State Save \/\u00a0Restore)<\/h3>\n<h4 name=\"2032\" class=\"graf graf--h4\">onSaveInstanceState()<\/h4>\n<p name=\"e6fb\" class=\"graf graf--p\">\uba3c\uc800 \uc0c1\ud0dc\ub97c \uc800\uc7a5\ud558\ub824\uba74 ID\ub97c \uc81c\uacf5\ud574\uc57c \ud55c\ub2e4. View \uacc4\uce35\uc5d0 \ub3d9\uc77c\ud55c ID\ub97c \uac00\uc9c4 \uc5ec\ub7ec \uac1c\uc758 \ubdf0\uac00\uc788\ub294 \uacbd\uc6b0 \uace0\uc720\ud55c ID\ub97c \uc9c0\uc815\ud558\uc5ec \ubaa8\ub4e0 \uc0c1\ud0dc\ub97c \uc800\uc7a5\ud560 \uc218 \uc788\ub3c4\ub85d \ud55c\ub2e4.<\/p>\n<p name=\"a4c7\" class=\"graf graf--p\">\ub458\uc9f8, View.BaseSavedState\ub97c \ud655\uc7a5\ud558\uc5ec \uc18d\uc131\uac12\uc744 \uc800\uc7a5\ud558\ub294 \ud074\ub798\uc2a4\uac00 \ud544\uc694\ud558\ub2e4. \uc774\ud574\ub97c \ub3d5\uae30 \uc704\ud574 \uc544\ub798\uc5d0 \uc608\uc81c \ucf54\ub4dc\uac00 \uc900\ube44\ub418\uc5b4 \uc788\ub2e4.<\/p>\n<h4 name=\"53d5\" class=\"graf graf--h4\">onRestoreInstanceState(Parcelable state)<\/h4>\n<p name=\"51e8\" class=\"graf graf--p\">\uc5ec\uae30\uc11c\ub294 \uc774 onRestoreInstanceState\uba54\uc11c\ub4dc\ub97c \uc7ac\uc815\uc758\ud558\uace0 Parcelable\uc5d0\uc11c \ub370\uc774\ud130\ub97c \uc77d\uc740 \ub2e4\uc74c Parcelable\uc5d0\uc11c \uc0ac\uc6a9 \uac00\ub2a5\ud55c \ub370\uc774\ud130\ub97c \uae30\ubc18\uc73c\ub85c \ub85c\uc9c1\uc744 \uc791\uc131\ud574\uc57c \ud55c\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<p><script src=\"https:\/\/gist.github.com\/pavan520\/cd3208f2a5e05d3c179bc7af108bc6a1.js\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/proandroiddev.com\/the-life-cycle-of-a-view-in-android-6a2c4665b95e\uc744 \ubc88\uc5ed\ud55c \ub0b4\uc6a9\uc785\ub2c8\ub2e4. \uc548\ub4dc\ub85c\uc774\ub4dc \uc571\uc744 \uc2e4\ud589\ud560 \ub54c \uc6b0\ub9ac\uac00 \uac00\uc7a5 \uba3c\uc800 \uc2a4\ud06c\ub9b0\uc5d0\uc11c \ubcfc \uc218 \uc788\ub294 \uac83\uc774 View\ub77c\uace0 \ub9d0\ud560 \uc218 \uc788\ub2e4. View \ud074\ub798\uc2a4\ub294 \uc0ac\uc6a9\uc790 \uc778\ud130\ud398\uc774\uc2a4 \uae30\ubcf8\uc801\uc778 \uad6c\uc131 \uc694\uc18c\ub97c \uac00\uc9c0\uace0 \uc788\ub2e4. \uc608\ub97c\ub4e4\uc5b4 \uc2a4\ud06c\ub9b0\uc704 \uc0ac\uac01\ud615 \uc601\uc5ed\uc5d0\uc11c \uadf8\ub9ac\uae30 \ubc0f \uc774\ubca4\ud2b8 \ucc98\ub9ac \uac19\uc740 \uc791\uc5c5\uc774 View\ub97c \ud1b5\ud574 \uc774\ub8e8\uc5b4\uc9c4\ub2e4. View\ub294 Button, TextView, ImageView \ub4f1\uc758 \uc704\uc82f\uc744 \uc791\uc131\ud558\ub294 \ub370 \uc0ac\uc6a9\ub418\ub294 [&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":[26],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts\/29013"}],"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=29013"}],"version-history":[{"count":4,"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts\/29013\/revisions"}],"predecessor-version":[{"id":29018,"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts\/29013\/revisions\/29018"}],"wp:attachment":[{"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=29013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=29013"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=29013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}