没有自定义过滤器的 ListView 过滤
ListView filtering without custom filter
我得到了过滤器列表视图的代码如下。但它不考虑中间词。
我可以通过包含没有自定义过滤器的词来过滤吗?
ListView listView;
String[] from = { "php_key","c_key","android_key","hacking_key" };
ArrayAdapter arrayAdapter;
listView = (ListView) findViewById(R.id.zone_list);
arrayAdapter = new ArrayAdapter(this,R.layout.setlanguage, R.id.tvName, from);
listView.setAdapter(arrayAdapter);
我得到答案了。首先在数组中搜索然后 setAdapter .
ListView listView;
String[] from = { "php_key","c_key","android_key","hacking_key" };
ArrayAdapter arrayAdapter;
listView = (ListView) findViewById(R.id.zone_list);
arrayAdapter = new ArrayAdapter(this,R.layout.setlanguage, R.id.tvName, from);
If(from.contains("search text")){
listView.setAdapter(arrayAdapter);
}
我得到了过滤器列表视图的代码如下。但它不考虑中间词。 我可以通过包含没有自定义过滤器的词来过滤吗?
ListView listView;
String[] from = { "php_key","c_key","android_key","hacking_key" };
ArrayAdapter arrayAdapter;
listView = (ListView) findViewById(R.id.zone_list);
arrayAdapter = new ArrayAdapter(this,R.layout.setlanguage, R.id.tvName, from);
listView.setAdapter(arrayAdapter);
我得到答案了。首先在数组中搜索然后 setAdapter .
ListView listView;
String[] from = { "php_key","c_key","android_key","hacking_key" };
ArrayAdapter arrayAdapter;
listView = (ListView) findViewById(R.id.zone_list);
arrayAdapter = new ArrayAdapter(this,R.layout.setlanguage, R.id.tvName, from);
If(from.contains("search text")){
listView.setAdapter(arrayAdapter);
}