Android Application Development Training Tutorial                      For more info visit                   http://www.zy...
Example of MultiAutoCompleteTextViewMultiAutoCompleteTextView is an editable text view, extending AutoCompleteTextView, th...
java main codepackage com.exercise.AndroidMultiAutoCompleteTextView;import     android.app.Activity;import     android.os....
Upcoming SlideShare
Loading in …5
×

Example of multi autocompletetextview

3,103 views

Published on

Visit http://www.zybotech.in

Published in: Business, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,103
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Example of multi autocompletetextview

  1. 1. Android Application Development Training Tutorial For more info visit http://www.zybotech.in A7, Stephanos Tower, Eachamukku, Kakkanadu,Kochi
  2. 2. Example of MultiAutoCompleteTextViewMultiAutoCompleteTextView is an editable text view, extending AutoCompleteTextView, that can showcompletion suggestions for the substring of the text where the user is typing instead of necessarily for the entirething.You must must provide a MultiAutoCompleteTextView.Tokenizer to distinguish the various substrings.It can be comapred with "Example of AutoCompleteTextView".main.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" ><TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /><MultiAutoCompleteTextView android:id="@+id/multiautocompletetextview" android:layout_width="fill_parent" android:layout_height="wrap_content" android:completionThreshold="1" /></LinearLayout> A7, Stephanos Tower, Eachamukku, Kakkanadu,Kochi
  3. 3. java main codepackage com.exercise.AndroidMultiAutoCompleteTextView;import android.app.Activity;import android.os.Bundle;import android.widget.ArrayAdapter;import android.widget.MultiAutoCompleteTextView;public class AndroidMultiAutoCompleteTextView extends Activity { MultiAutoCompleteTextView myMultiAutoCompleteTextView; 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); MultiAutoCompleteTextView myMultiAutoCompleteTextView = (MultiAutoCompleteTextView)findViewById( R.id.multiautocompletetextview); myMultiAutoCompleteTextView.setAdapter( new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, item)); myMultiAutoCompleteTextView.setTokenizer( new MultiAutoCompleteTextView.CommaTokenizer()); }} A7, Stephanos Tower, Eachamukku, Kakkanadu,Kochi

×