androdi 中listview.setTextFilterEnabled(boolean)的作用


官方API注释如下:

Enables or disables the type filter window. If enabled, typing when this view has focus will filter the children to match the users input. Note that the Adapter used by this view must implement the Filterable interface.

 

大概意思就是但listview获得当前焦点的时候,相应用户输入的匹配符。筛选出匹配的listview Items。

 

String[] menus = { "1信息查询", "1信息采集", "2文件上传","2GPS定位功能" };
  setListAdapter(new ArrayAdapter<String>(this,
    android.R.layout.simple_list_item_1, menus));
  getListView().setTextFilterEnabled(true);

 

 

按键盘前listView的值"1信息查询"、"1信息采集、按下键盘2的时候listview里面的值   "2文件上传"、"2GPS定位功能"


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM