Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Create one project for <code>AutoCompleteTextView</code> and paste the code to required place -</p> <p><strong>main.xml</strong></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" &gt; &lt;TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /&gt; &lt;AutoCompleteTextView android:id="@+id/myautocomplete" android:layout_width="fill_parent" android:layout_height="wrap_content" android:completionThreshold="1" /&gt; &lt;/LinearLayout&gt; </code></pre> <p><strong>AutoCompleteTextview.java</strong></p> <pre><code>public class AndroidAutoCompleteTextView extends Activity implements TextWatcher{ AutoCompleteTextView myAutoComplete; String item[]={ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); myAutoComplete = (AutoCompleteTextView)findViewById(R.id.myautocomplete); myAutoComplete.addTextChangedListener(this); myAutoComplete.setAdapter(new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_dropdown_item_1line, item)); } @Override public void afterTextChanged(Editable arg0) { // TODO Auto-generated method stub } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { // TODO Auto-generated method stub } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { // TODO Auto-generated method stub } } </code></pre> <p>Just use this example. And, figure out how they're setting adapter to <code>AutoComplete TextView</code> Hope this helps you.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload