现在的位置: 首页 > 综合 > 正文

Android ApiDemos示例解析(103):Views->Auto Complete->5. Contacts with Hint

2013年10月19日 ⁄ 综合 ⁄ 共 362字 ⁄ 字号 评论关闭

上例使用Contacts中联系人作为AutoCompleteTextView 的提示内容时,使用了另外一个文本框来提示用户可以使用 * 作为通配符来匹配所有联系人:

本例介绍了AutoCompleteTextView
的 completionHint 属性用法,提供设置completionHint 属性,提示信息可以直接显示在提示下拉框中:

<AutoCompleteTextView android:id=”@+id/edit”
android:completionThreshold=”1″
android:completionHint=”@string/autocomplete_5_hint”
android:layout_width=”match_parent”
android:layout_height=”wrap_content”/>

抱歉!评论已关闭.