• 04 AutoCompleteTextView


    作用:输入部分文字跳处下拉框列出相应的条目



    <pre name="code" class="html">

    
    
     <!--
    	当文本框出现两个字符才开始检索列表
    		android:completionThreshold="2"
    		 默认输入俩个字符  才开始索引
        -->
      
        <AutoCompleteTextView
            android:id="@+id/actv"
            android:layout_width="200dp"
            android:layout_height="wrap_content"
            android:hint="输入好友姓名"
            android:completionThreshold="2" 
             />
    	//每次改变之后的是字符串 
    			//before 被删除的元素个数
    			//count 增加个数
    			//start开始坐标
    			@Override
    			public void onTextChanged(CharSequence s, int start, int before, int count) {
    				// TODO Auto-generated method stub
    				
    			}
    			//每次改变之后的是字符串 
    			//after 增加个数
    			//count 删除个数
    			//start开始坐标
    			@Override
    			public void beforeTextChanged(CharSequence s, int start, int count, int after) {
    				// TODO Auto-generated method stub
    				
    			}
    			
    			@Override
    			public void afterTextChanged(Editable s) {
    				// TODO Auto-generated method stub
    				
    			}
    		});




  • 相关阅读:
    Maven的作用
    redis持久化的几种方式
    3.持续交付实战用户管理服务
    MySQL 一些概念
    Git学习笔记--定制
    Git学习笔记--标签
    Git学习笔记--分支
    Git学习笔记--远程仓库
    Git学习笔记--版本控制
    Git学习笔记--init、add、commit
  • 原文地址:https://www.cnblogs.com/muyuge/p/6152300.html
Copyright © 2020-2023  润新知