通过改写ArrayAdapter 用AutoCompleteTextView 实现汉字和拼音双向关联
2010-07-15 20:43:00 来源:WEB开发网* @param context The current context.
* @param textViewResourceId The resource ID for a layout file containing a TextView to use when
* instantiating views.
*/
public CityAdapter(Context context, int textViewResourceId) {
init(context, textViewResourceId, 0, new ArrayList
}
/**
* Constructor
*
* @param context The current context.
* @param resource The resource ID for a layout file containing a layout to use when
* instantiating views.
* @param textViewResourceId The id of the TextView within the layout resource to be populated
*/
public CityAdapter(Context context, int resource, int textViewResourceId) {
init(context, resource, textViewResourceId, new ArrayList
}
/**
* Constructor
*
* @param context The current context.
* @param textViewResourceId The resource ID for a layout file containing a TextView to use when
* instantiating views.
* @param objects The objects to represent in the ListView.
* @param objects2 城市拼音数组
*/
public CityAdapter(Context context, int textViewResourceId, T[] objects,T[] objects2) {
init(context, textViewResourceId, 0, Arrays.asList(objects),Arrays.asList(objects2));
}
/**
* Constructor
*
* @param context The current context.
* @param resource The resource ID for a layout file containing a layout to use when
* instantiating views.
* @param textViewResourceId The id of the TextView within the layout resource to be populated
* @param objects The objects to represent in the ListView.
*/
public CityAdapter(Context context, int resource, int textViewResourceId,
Tags:通过 改写 ArrayAdapter
编辑录入:coldstar [复制链接] [打 印]更多精彩
赞助商链接