Back to project page SmartNavi.
The source code is released under:
Apache License
If you think the Android project SmartNavi listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.ilm.sandwich.helferklassen; //from ww w .ja v a2 s .c o m import android.app.SearchManager; import android.content.Context; import android.database.Cursor; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.support.v4.widget.CursorAdapter; import android.widget.TextView; public class SuggestionsAdapter extends CursorAdapter { public SuggestionsAdapter(Context context, Cursor c) { super(context, c, 0); } @Override public View newView(Context context, Cursor cursor, ViewGroup parent) { LayoutInflater inflater = LayoutInflater.from(context); View v = inflater.inflate(android.R.layout.simple_list_item_1, parent, false); return v; } @Override public void bindView(View view, Context context, Cursor cursor) { TextView tv = (TextView) view; final int textIndex = cursor.getColumnIndex(SearchManager.SUGGEST_COLUMN_TEXT_1); tv.setText(cursor.getString(textIndex)); } }