androdi 中listview.setTextFilterEnabled(boolean)的作用

大概意思就是但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定位功能"

时间: 2024-08-25 11:43:16

androdi 中listview.setTextFilterEnabled(boolean)的作用的相关文章

ExpandableListView讲解(ListView的子类其作用类似于两个ListView的嵌套)

/* * 记录一下方便查阅 */ 有时候,使用ListView并不能满足应用程序所需要的功能.有些应用程序需要多组ListView,这时候我们就要使用一种新的控件ExpandableListView——可以扩展的ListView.它的作用就是将ListView进行分组.就好像我们使用QQ的时候,有“我的好友”,“陌生人”,“黑名单”一样,点击一下会扩展开,再点击一下又会收缩回去. ExpandableListView是一个垂直滚动显示两级列表项的视图,与ListView不同的是,它可以有两层:每

ListView.setOnItemClickListener不起作用的原因

ListView.setOnItemClickListener不起作用的原因是item的layout中对以下两个属性设置为true: android:focusable="true" android:focusableInTouchMode="true" 将其改为false或者不设置(默认为false)即可: android:focusable="false" android:focusableInTouchMode="false&qu

Basic4Android中ListView组建的演示

#Region Project Attributes #ApplicationLabel: ListViewTest #VersionCode: 20140625 #VersionName: 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: unspecified #CanInstallToExternalStorage: False #End R

Android中ListView字母排序,实现字母挤压效果以及右侧快速选中字母,搜索关键字功能

Android中ListView字母排序,实现字母挤压效果以及右侧快速选中字母,搜索关键字功能 本文中阐述如何自定义EditText实现搜索框自定义的样式以及挤压字母的思路等 自定义EditText 相关的drawable文件 主界面以及相关的适配器 结果展示 定义要呈现的EditText的样式 public class ClearEditText extends EditText implements OnFocusChangeListener, TextWatcher { /** * 定义删

java中instanceof和getClass()的作用

初学者难免有点混淆java中instanceof和getClass()的作用,  下面就来一一讲解.    父类A: class A { }     子类B: class B extends A { }      构造对象 Object o1 = new A(); Object o2 = new B(); 一.instanceof     演示一: 1.o1 instanceof A => true  2.o1 instanceof B => false  3.o2 instanceof A

C++ 中 const 和 static 的作用

目录 const 的主要应用如下: const 关键字使用的注意点: C++中static关键字有三个明显的作用: const的主要应用如下: const 用于定义常量:const定义的常量编译器可以对其进行数据静态类型的安全检查. const 修饰函数形式参数:当输入参数为用户自定义类型和抽象数据类型的时候,将"值传递"改为"const 引用传递" 可以提高效率. const 修饰函数的返回值:如果给"指针传递"的函数返回值加const,则返回

Flex中 Array 的IndexOf 的作用

Flex中 Array 的IndexOf 的作用 1.说明    indexOf用于在索引中从小到大查找,假设查得到就返回索引值,查不到就返回-1: 2.实例 (1)设计源代码 <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe

form 中Enctype=multipart/form-data 的作用

ENCTYPE="multipart/form-data"用于表单里有图片上传. <form name="userInfo" method="post" action="first_submit.jsp"    ENCTYPE="multipart/form-data">表单标签中设置enctype="multipart/form-data"来确保匿名上载文件的正确编码. 如

转:css中overflow:hidden 不起作用了吗?

css中overflow:hidden 不起作用了吗? 有同学遇到这样的问题,现象是给元素设置了overflow:hidden,但超出容器的部分并没有被隐藏,难道是设置的hidden失效了吗?其实看似不合理的现象背后都会有其合理的解释. 我们知道,overflow属性值有这几种:visible:声明内容不会被剪裁.比如内容可能被渲染到容器外面.hidden:声明内容将被剪裁,并且也甭想使用滚动条来查看剪裁掉的内容.scroll:声明内容将被剪裁,但有可能出现滚动条来查看被剪裁掉的内容.滚动条出现