{"id":892,"date":"2012-07-20T04:22:09","date_gmt":"2012-07-19T19:22:09","guid":{"rendered":"http:\/\/adreamer.godohosting.com\/?p=892"},"modified":"2012-07-20T04:23:13","modified_gmt":"2012-07-19T19:23:13","slug":"%ec%98%a4%eb%8a%98%ec%9d%98-%ec%82%bd%ec%a7%88-alertdialog%ec%9d%98-edittext%ec%97%90-%ed%82%a4%eb%b3%b4%eb%93%9c-%eb%b3%b4%ec%97%ac%ec%a3%bc%ea%b8%b0","status":"publish","type":"post","link":"http:\/\/milkdrops.net\/index.php\/archives\/892","title":{"rendered":"\uc624\ub298\uc758 \uc0bd\uc9c8 &#8211; AlertDialog\uc758 EditText\uc5d0 \ud0a4\ubcf4\ub4dc \ubcf4\uc5ec\uc8fc\uae30"},"content":{"rendered":"<p>AlertDialog\uc5d0 \ub123\uc5c8\ub358 EditText\uc5d0\uc11c \ud3ec\ucee4\uc2a4\ub294 \uac00\uc788\uc5b4\ub3c4 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \ud0a4\ubcf4\ub4dc\uac00 \ub098\ud0c0\ub098\uc9c0 \uc54a\ub294 \uc99d\uc0c1\uc774 \uc788\uc5b4\uc11c<br \/>\n\uad6c\uae00\ub9c1\uc744 \ud1b5\ud574 \uc628\uac16 \ud0a4\ubcf4\ub4dc\ub97c \ub098\ud0c0\ub0b4\uae30 \uc704\ud55c \uc2dc\ub3c4\ub97c \ud558\uc600\ub2e4.<\/p>\n<pre lang=\"java\">\r\nfinal View innerView = View.inflate(MainActivity.this, R.layout.name_edit_popup, null);\r\nfinal EditText editText = (EditText)innerView.findViewById(R.id.nameEdit);\r\n\t\t\t\t\r\nfinal AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)\r\n\t.setCustomTitle(innerView)\r\n\t.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\r\n\t\t\r\n\t\t@Override\r\n\t\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\/\/ something\r\n\t\t}\r\n\t}).create();\r\n\r\n\/\/ \uc2dc\ub3c4 1\r\ndialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);\r\n\r\n\/\/ \uc2dc\ub3c4 2\r\neditText.setOnFocusChangeListener(new View.OnFocusChangeListener() {\r\n    @Override\r\n    public void onFocusChange(View v, boolean hasFocus) {\r\n        if (hasFocus) {\r\n            dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\r\n        }\r\n    }\r\n});\r\n\r\n\/\/ \uc2dc\ub3c4 3\r\ndialog.setOnShowListener(new OnShowListener() {\r\n\r\n    @Override\r\n    public void onShow(DialogInterface dialog) {\r\n        InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\r\n        imm.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT);\r\n    }\r\n});\r\n\r\ndialog.show();\r\n<\/pre>\n<p>\uadf8\ub7f0\ub370\ub3c4 \ud0a4\ubcf4\ub4dc\uac00 \ub098\ud0c0\ub098\uc9c0 \uc54a\uc544\uc11c \uba58\ubd95\ud558\uace0 \uc788\uc5c8\ub294\ub370&#8230;<\/p>\n<p><code><br \/>\n...<br \/>\nfinal AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)<br \/>\n\t.<strong>setCustomTitle<\/strong>(innerView)<br \/>\n\t.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {<br \/>\n...<br \/>\n<\/code><\/p>\n<p>setView\uac00 \uc544\ub2c8\ub77c <em>setCustomTitle<\/em>\uc744 \uc0ac\uc6a9\ud558\uace0 \uc788\uc5c8\uc74c\uc744 \ubc1c\uacac\ud558\uc600\ub2e4&#8230;<\/p>\n<p>CustomTitle\uc5d0 \ub123\uc740 EditText\uc5d0\uc11c\ub294 \ud0a4\ubcf4\ub4dc\ub97c \ubcf4\uc5ec\uc8fc\uc9c0 \uc54a\ub294 \ub4ef\ud558\ub2c8 \ucc38\uace0\ud558\uae38<\/p>\n","protected":false},"excerpt":{"rendered":"<p>AlertDialog\uc5d0 \ub123\uc5c8\ub358 EditText\uc5d0\uc11c \ud3ec\ucee4\uc2a4\ub294 \uac00\uc788\uc5b4\ub3c4 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \ud0a4\ubcf4\ub4dc\uac00 \ub098\ud0c0\ub098\uc9c0 \uc54a\ub294 \uc99d\uc0c1\uc774 \uc788\uc5b4\uc11c \uad6c\uae00\ub9c1\uc744 \ud1b5\ud574 \uc628\uac16 \ud0a4\ubcf4\ub4dc\ub97c \ub098\ud0c0\ub0b4\uae30 \uc704\ud55c \uc2dc\ub3c4\ub97c \ud558\uc600\ub2e4. final View innerView = View.inflate(MainActivity.this, R.layout.name_edit_popup, null); final EditText editText = (EditText)innerView.findViewById(R.id.nameEdit); final AlertDialog dialog = new AlertDialog.Builder(MainActivity.this) .setCustomTitle(innerView) .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { \/\/ something } }).create(); \/\/ &hellip; <a href=\"http:\/\/milkdrops.net\/index.php\/archives\/892\" class=\"more-link\"><span class=\"screen-reader-text\">\uc624\ub298\uc758 \uc0bd\uc9c8 &#8211; AlertDialog\uc758 EditText\uc5d0 \ud0a4\ubcf4\ub4dc \ubcf4\uc5ec\uc8fc\uae30<\/span> \ub354\ubcf4\uae30 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[17],"tags":[144,77,102,146,145],"class_list":["post-892","post","type-post","status-publish","format-standard","hentry","category-17","tag-alertdialog","tag-android","tag-edittext","tag-software-keyboare","tag-145"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/milkdrops.net\/index.php\/wp-json\/wp\/v2\/posts\/892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/milkdrops.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/milkdrops.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/milkdrops.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/milkdrops.net\/index.php\/wp-json\/wp\/v2\/comments?post=892"}],"version-history":[{"count":7,"href":"http:\/\/milkdrops.net\/index.php\/wp-json\/wp\/v2\/posts\/892\/revisions"}],"predecessor-version":[{"id":899,"href":"http:\/\/milkdrops.net\/index.php\/wp-json\/wp\/v2\/posts\/892\/revisions\/899"}],"wp:attachment":[{"href":"http:\/\/milkdrops.net\/index.php\/wp-json\/wp\/v2\/media?parent=892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/milkdrops.net\/index.php\/wp-json\/wp\/v2\/categories?post=892"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/milkdrops.net\/index.php\/wp-json\/wp\/v2\/tags?post=892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}