{"id":2037,"date":"2014-05-06T05:33:25","date_gmt":"2014-05-05T20:33:25","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=2037"},"modified":"2017-01-30T21:18:09","modified_gmt":"2017-01-30T12:18:09","slug":"android-%ec%8a%a4%eb%a0%88%eb%93%9c%ec%97%90%ec%84%9c-progressdialog-%ec%82%ac%ec%9a%a9","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=2037","title":{"rendered":"[Android] \uc2a4\ub808\ub4dc\uc5d0\uc11c ProgressDialog \uc0ac\uc6a9"},"content":{"rendered":"<p><P>ProgressDialog\uac00 \uc0ac\uc6a9\ub418\ub294 \uacbd\uc6b0\ub294 \ub300\ubd80\ubd84 \uc2dc\uac04\uc774 \ub9ce\uc774 \uc18c\uc694\ub418\ub294 \uc5f0\uc0b0\uc744 \uc2a4\ub808\ub4dc\uc5d0\uc11c \uc2e4\ud589\ud560\ub54c \uc0ac\uc6a9\uc790\uc5d0\uac8c \ub300\uae30\ud558\ub3c4\ub85d \ud558\ub294 \uc6a9\ub3c4\uc785\ub2c8\ub2e4. \uadf8\ub7ec\ub098 \uc774 \uae00\uc758 \uc81c\ubaa9\uc5d0\uc11c \uc5b8\uae09\ub41c \uc2a4\ub808\ub4dc\ub294 ProgressDialog\ub97c \uc0dd\uc131\ud558\uace0 \ud45c\uc2dc(Show)\ud558\ub294 \ucf54\ub4dc\uac00 \uc2a4\ub808\ub4dc\uc5d0 \uc704\uce58\ud558\ub294 \uacbd\uc6b0\ub97c \uc758\ubbf8\ud569\ub2c8\ub2e4.<\/P><\/p>\n<p><P>\ube14\ub799\ud3ec\uc778\ud2b8\ub77c\ub294 \ubaa8\ubc14\uc77c GIS \uc5d4\uc9c4\uc5d0\uc11c \uc9c0\ub3c4\ub97c \ucc98\uc74c \uadf8\ub9ac\uae30 \uc2dc\uc791\ud560\ub54c \ubc1c\uc0dd\ud558\ub294 \uc774\ubca4\ud2b8\uc640 \uc9c0\ub3c4\uac00 \ubaa8\ub450 \ub2e4 \uadf8\ub824\uc9c8\ub54c \ubc1c\uc0dd\ud558\ub294 \uc774\ubca4\ud2b8\uc758 \ub9ac\uc2a4\ub108\ub294 \uac01\uac01 OnBeforeMapDrawEventListener\uc640 OnUpdateMapCompletedEventListener\uc785\ub2c8\ub2e4. \uc774 \uc774\ubca4\ud2b8 \ub9ac\uc2a4\ub108\uac00 \ud638\ucd9c\ub418\ub294 \uc704\uce58\uac00 \ubc14\ub85c \uadf8\ub9ac\uae30 \uc2a4\ub808\ub4dc(Rendering Thread)\uc774\ubbc0\ub85c Handler\ub97c \uc0ac\uc6a9\ud558\uc5ec ProgressDialog\ub97c \uc0dd\uc131\ud558\uace0 \ud45c\uc2dc\ud574\uc918\uc57c \ud569\ub2c8\ub2e4.<\/P><\/p>\n<pre>private static ProgressDialog progressDialog = null;\r\n\r\n@Override\r\npublic void onBeforeMapDraw(BeforeMapDrawEvent event) {\r\n    Message msg = new Message();\r\n    msg.what = 0;\r\n    msg.obj = event;\r\n    handler.sendMessage(msg);\r\n}\r\n\t\r\n@Override\r\npublic void onUpdateMapCompleted(UpdateMapCompletedEvent event) {\r\n    handler.sendEmptyMessage(1);\r\n}\r\n\t\r\nprivate static Handler handler = new Handler() {\r\n    public void handleMessage(Message msg) {\r\n        if(msg.what == 0) {\r\n            BeforeMapDrawEvent event = (BeforeMapDrawEvent)msg.obj;\r\n            if(event.isCalledUpdateMethod()) {\r\n                if(MainActivity.progressDialog == null)  {\r\n                    MainActivity.progressDialog = ProgressDialog.show(\r\n                        event.getMap().getContext(), \"\", \r\n                        Html.fromHtml(\r\n                            \"<big>Please wait for map drawing ...<\/big>\"));\r\n                    Window dlgWin = MainActivity.progressDialog.getWindow()\r\n                    dlgWin.setGravity(Gravity.BOTTOM);\r\n                }\r\n            }\t\t\t\t\r\n        } else if(msg.what == 1) {\r\n            if(MainActivity.progressDialog != null) { \r\n                MainActivity.progressDialog.hide();\r\n                MainActivity.progressDialog = null;\r\n            }\t\t\t\t\r\n        }\r\n    }\r\n};<\/pre>\n<p><P>\uc2a4\ub808\ub4dc\ub85c\ubd80\ud130 \uc548\uc804\ud55c ProgressDialog\ub97c \ud45c\uc2dc\ud558\ub294 \uc911\uc694\ud55c \ucf54\ub4dc\ub294 16\ubc88 \ucf54\ub4dc\ubd80\ud130\uc785\ub2c8\ub2e4. \uc544\ub798\ub294 \uc704\uc758 \ucf54\ub4dc\uac00 \uc801\uc6a9\ub418\uc5b4 \uc2e4\uc81c \uc2e4\ud589\ub418\ub294 \ud654\uba74\uc785\ub2c8\ub2e4.<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/1\/1120511776.png\" width=\"510\" height=\"560\" alt=\"\uc0ac\uc6a9\uc790 \uc0bd\uc785 \uc774\ubbf8\uc9c0\" title=\"\" \/><\/p>\n<p><\/P><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ProgressDialog\uac00 \uc0ac\uc6a9\ub418\ub294 \uacbd\uc6b0\ub294 \ub300\ubd80\ubd84 \uc2dc\uac04\uc774 \ub9ce\uc774 \uc18c\uc694\ub418\ub294 \uc5f0\uc0b0\uc744 \uc2a4\ub808\ub4dc\uc5d0\uc11c \uc2e4\ud589\ud560\ub54c \uc0ac\uc6a9\uc790\uc5d0\uac8c \ub300\uae30\ud558\ub3c4\ub85d \ud558\ub294 \uc6a9\ub3c4\uc785\ub2c8\ub2e4. \uadf8\ub7ec\ub098 \uc774 \uae00\uc758 \uc81c\ubaa9\uc5d0\uc11c \uc5b8\uae09\ub41c \uc2a4\ub808\ub4dc\ub294 ProgressDialog\ub97c \uc0dd\uc131\ud558\uace0 \ud45c\uc2dc(Show)\ud558\ub294 \ucf54\ub4dc\uac00 \uc2a4\ub808\ub4dc\uc5d0 \uc704\uce58\ud558\ub294 \uacbd\uc6b0\ub97c \uc758\ubbf8\ud569\ub2c8\ub2e4. \ube14\ub799\ud3ec\uc778\ud2b8\ub77c\ub294 \ubaa8\ubc14\uc77c GIS \uc5d4\uc9c4\uc5d0\uc11c \uc9c0\ub3c4\ub97c \ucc98\uc74c \uadf8\ub9ac\uae30 \uc2dc\uc791\ud560\ub54c \ubc1c\uc0dd\ud558\ub294 \uc774\ubca4\ud2b8\uc640 \uc9c0\ub3c4\uac00 \ubaa8\ub450 \ub2e4 \uadf8\ub824\uc9c8\ub54c \ubc1c\uc0dd\ud558\ub294 \uc774\ubca4\ud2b8\uc758 \ub9ac\uc2a4\ub108\ub294 \uac01\uac01 OnBeforeMapDrawEventListener\uc640 OnUpdateMapCompletedEventListener\uc785\ub2c8\ub2e4. \uc774 \uc774\ubca4\ud2b8 \ub9ac\uc2a4\ub108\uac00 \ud638\ucd9c\ub418\ub294 \uc704\uce58\uac00 \ubc14\ub85c \uadf8\ub9ac\uae30 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=2037\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;[Android] \uc2a4\ub808\ub4dc\uc5d0\uc11c ProgressDialog \uc0ac\uc6a9&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61],"tags":[],"class_list":["post-2037","post","type-post","status-publish","format-standard","hentry","category-android"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/2037","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2037"}],"version-history":[{"count":1,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/2037\/revisions"}],"predecessor-version":[{"id":2863,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/2037\/revisions\/2863"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2037"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2037"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}