I'd like to create an AutoCompleteTextView, and make its dropdown
items to be rendered in one separate ListView. This is just like
Google's instant search page.

I tried the following ways to do, but failed:
1) in inherited class of CursorAdapter, override method newView() to
append view item to ListView.
    public View newView(Context context, Cursor cursor, ViewGroup
parent) {
        LayoutInflater inflater =
(LayoutInflater)context.getSystemService(LAYOUT_INFLATER_SERVICE);
        TextView view =
(TextView)inflater.inflate(android.R.layout.simple_dropdown_item_1line,
mListView, true);
        return view;
    }
    But finally I got unsupportedOperationException, because after the
adapter being set, adding new views to the ListView is prohibited.

2) call method mAutoTextView.setDropDownAnchor(R.id.memo_listview) to
anchor the dropdown list to the ListView. But after test, I found that
the dropdown list is not rendered in the ListView, but floating at top
of the AutoCompleteTextView.

Please help me on this or just give me some tips. Thanks!

-- Jerry Joe

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to