官方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定位功能"