AutoCompleteTextView的简单用法

AutoCompleteTextView的简单用法:

1.android:completionHint  设置下拉菜单中提示的标题

   对应的方法:setCompletionHint(CharSequence)

2. android:comletionHintView 设置下拉菜单中提示标题的视图

3. android:completionThreshold 设置用户至少输入几个字符才会提示显示

    对应的方法:setThreshold(int) 

4. android:dropDownAnchor 设置下拉菜单的定位“锚点”组件,如果没有指定改属性,将使用该TextView作为定位“锚点”组件

     对应的方法:setDropDownAnchor(int)

5. android:dropDownHeight 设置下拉菜单的高度

    对应的方法:setDropDownHeight(int)

6. android:dropDownHorizontalOffset 设置下拉菜单与文本框之间的水平偏移。下拉菜单默认与文本框左对齐

7. android:dropDownVerticalOffset 设置下拉菜单与文本框之间的垂直偏移。下拉菜单默认紧跟文本框

8. android:dropDownWidth 设置下拉菜单的高度

    对应的方法:setDropDownWidth(int)



参考:疯狂android讲义


你可能感兴趣的:(AutoCompleteTextView的简单用法)