{"id":3751,"date":"2021-11-04T19:19:37","date_gmt":"2021-11-04T10:19:37","guid":{"rendered":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=3751"},"modified":"2021-11-04T22:26:58","modified_gmt":"2021-11-04T13:26:58","slug":"autocompletetextview","status":"publish","type":"post","link":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=3751","title":{"rendered":"EditText to AutoCompleteTextView"},"content":{"rendered":"<h1>EditText to AutoCompleteTextView<\/h1>\n<p><a href=\"https:\/\/sharp57dev.tistory.com\/m\/12\">\ucc38\uc870<\/a><\/p>\n<p><a href=\"https:\/\/ppost.tistory.com\/entry\/AutocompleteTextview-%EC%98%88%EC%A0%9C-%EB%B0%8F-%EA%B5%AC%EB%B6%84%EC%84%A0-%EC%8A%A4%ED%83%80%EC%9D%BC%EB%A7%81-%EB%B0%A9%EB%B2%95\">\ucc38\uc870<\/a><\/p>\n<p>EditText \ub97c AutoCompleteTextView \ub85c \ubc14\uafd4 \ubcf8\ub2e4.<br \/>\n\uc758\uc678\ub85c \uac04\ub2e8\ud574\uc11c \ub180\ub790\ub2e4.<\/p>\n<h2>EditText<\/h2>\n<pre><code class=\"language-xml\">                &lt;EditText\n                    android:id=&quot;@+id\/editTextSearchBox&quot;\n                    android:layout_width=&quot;fill_parent&quot;\n                    android:layout_height=&quot;wrap_content&quot;\n                    android:autofillHints=&quot;&quot;\n                    android:background=&quot;@drawable\/search_box&quot;\n                    android:ems=&quot;10&quot;\n                    android:hint=&quot;@string\/search_text&quot;\n                    android:inputType=&quot;text&quot;\n                    android:minHeight=&quot;40dp&quot;\n                    android:textSize=&quot;15sp&quot;\n                    android:paddingStart=&quot;10dp&quot;\n                    android:paddingEnd=&quot;10dp&quot;\n                    android:layout_marginEnd=&quot;10dp&quot;\n                    android:textColor=&quot;#FFFFFF&quot;\n                    android:textColorHint=&quot;#AAAAAA&quot; \/&gt;<\/code><\/pre>\n<p>search_box.xml<\/p>\n<pre><code class=\"language-xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\n\n&lt;shape xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;\n    android:shape=&quot;rectangle&quot; android:thickness=&quot;0dp&quot;&gt;\n    &lt;stroke android:width=&quot;2dp&quot; android:color=&quot;#FFFFFF&quot;\/&gt;\n    &lt;corners android:radius=&quot;8dp&quot;\/&gt;\n    &lt;solid android:color=&quot;@null&quot;\/&gt;\n&lt;\/shape&gt;<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2021\/11\/2021-11-04-01.png\" alt=\"\" \/><\/p>\n<h2>AutoCompleteTextView<\/h2>\n<p>AutoCompleteTextView \ub294 EditText \ub97c \uc0c1\uc18d\ud558\uae30\uc5d0,<br \/>\n\uc544\ubb34 \uc18c\uc2a4 \uc218\uc815\uc5c6\uc774 \ubaa8\ub4e0 \uae30\ub2a5\ub4e4\uc774 \uc815\uc0c1 \uc791\ub3d9\ud55c\ub2e4.<\/p>\n<pre><code class=\"language-xml\">                &lt;AutoCompleteTextView\n                    android:id=&quot;@+id\/editTextSearchBox&quot;\n                    android:layout_width=&quot;fill_parent&quot;\n                    android:layout_height=&quot;wrap_content&quot;\n                    android:autofillHints=&quot;&quot;\n                    android:background=&quot;@drawable\/search_box&quot;\n                    android:ems=&quot;10&quot;\n                    android:hint=&quot;@string\/search_text&quot;\n                    android:inputType=&quot;text&quot;\n                    android:minHeight=&quot;40dp&quot;\n                    android:textSize=&quot;15sp&quot;\n                    android:paddingStart=&quot;10dp&quot;\n                    android:paddingEnd=&quot;10dp&quot;\n                    android:layout_marginEnd=&quot;10dp&quot;\n                    android:textColor=&quot;#FFFFFF&quot;\n                    android:textColorHint=&quot;#AAAAAA&quot; \/&gt;<\/code><\/pre>\n<h2>\uc18d\uc131\ucd94\uac00<\/h2>\n<pre><code class=\"language-xml\">                &lt;AutoCompleteTextView\n                    android:id=&quot;@+id\/editTextSearchBox&quot;\n                    \/\/ ......\n                    android:completionThreshold=&quot;1&quot;\n                    \/\/ ......\n                    android:textColorHint=&quot;#AAAAAA&quot; \/&gt;<\/code><\/pre>\n<p>\uc544\ub798 \ucf54\ub4dc\ub9cc\uc73c\ub85c \ubaa8\ub4e0 \uae30\ub2a5\uc774 \uc815\uc0c1 \uc791\ub3d9\ud55c\ub2e4.<\/p>\n<pre><code class=\"language-java\">public class MainActivity extends AppCompatActivity {\n\n    AutoCompleteTextView searchBox;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n\n        searchBox       = findViewById(R.id.editTextSearchBox);\n\n        List&lt;String&gt; list = new ArrayList&lt;&gt;();\n\n        list.add(&quot;\uae40\uce58&quot;);\n        list.add(&quot;\uae40\uce58\ucc0c\uac1c&quot;);\n        list.add(&quot;\ubd80\ub300\uae40\uce58\ucc0c\uac1c&quot;);\n\n        searchBox.setAdapter(new ArrayAdapter&lt;&gt;(this,\n                android.R.layout.simple_dropdown_item_1line, list));\n    }\n}<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2021\/11\/2021-11-04-02.png\" alt=\"\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>EditText to AutoCompleteTextView \ucc38\uc870 \ucc38\uc870 EditText \ub97c AutoCompleteTextView \ub85c \ubc14\uafd4 \ubcf8\ub2e4. \uc758\uc678\ub85c \uac04\ub2e8\ud574\uc11c \ub180\ub790\ub2e4. EditText &lt;EditText android:id=&quot;@+id\/editTextSearchBox&quot; android:layout_width=&quot;fill_parent&quot; android:layout_height=&quot;wrap_content&quot; android:autofillHints=&quot;&quot; android:background=&quot;@drawable\/search_box&quot; android:ems=&quot;10&quot; android:hint=&quot;@string\/search_text&quot; android:inputType=&quot;text&quot; android:minHeight=&quot;40dp&quot; android:textSize=&quot;15sp&quot; android:paddingStart=&quot;10dp&quot; android:paddingEnd=&quot;10dp&quot; android:layout_marginEnd=&quot;10dp&quot; android:textColor=&quot;#FFFFFF&quot; android:textColorHint=&quot;#AAAAAA&quot; \/&gt; search_box.xml &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;shape xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot; android:shape=&quot;rectangle&quot; android:thickness=&quot;0dp&quot;&gt; &lt;stroke android:width=&quot;2dp&quot; android:color=&quot;#FFFFFF&quot;\/&gt; &lt;corners android:radius=&quot;8dp&quot;\/&gt; &lt;solid android:color=&quot;@null&quot;\/&gt; &lt;\/shape&gt; AutoCompleteTextView AutoCompleteTextView \ub294 EditText \ub97c \uc0c1\uc18d\ud558\uae30\uc5d0, \uc544\ubb34\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=3751\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[],"class_list":["post-3751","post","type-post","status-publish","format-standard","hentry","category-android"],"_links":{"self":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3751"}],"version-history":[{"count":10,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3751\/revisions"}],"predecessor-version":[{"id":3763,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3751\/revisions\/3763"}],"wp:attachment":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}