zoukankan      html  css  js  c++  java
  • EditText动态监听

    原网址:http://blog.csdn.net/sinat_35241409/article/details/53709537

    1、EditText输入框的动态监听方法

    A:监听 输入结束点击键盘确认键执行的 方法

    1. et_money.setOnEditorActionListener(new OnEditorActionListener() {  
    2.           
    3.         @Override  
    4.         public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {  
    5.             Log.e("输入完点击确认执行该方法", "输入结束");  
    6.             return false;  
    7.         }  
    8.     });  
    et_money.setOnEditorActionListener(new OnEditorActionListener() {
            
            @Override
            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
                Log.e("输入完点击确认执行该方法", "输入结束");
                return false;
            }
        });

    B:动态跟随键盘输入的监听方式

    et_money.addTextChangedListener(new TextWatcher() {
            
            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {
                // 输入的内容变化的监听
                Log.e("输入过程中执行该方法", "文字变化");
            }
            
            @Override
            public void beforeTextChanged(CharSequence s, int start, int count,
                    int after) {
                // 输入前的监听
                Log.e("输入前确认执行该方法", "开始输入");
                
            }
            
            @Override
            public void afterTextChanged(Editable s) {
                // 输入后的监听
                Log.e("输入结束执行该方法", "输入结束");
                
            }
        });

    
  • 相关阅读:
    EBS SQL > Form & Report
    oracle sql 优化分析点
    MRP 物料需求计划
    MRPII 制造资源计划
    Barcode128 应用实务
    Oracle SQL语句优化技术分析
    APPSQLAP10710 Online accounting could not be created. AP Invoice 无法创建会计分录
    Oracle数据完整性和锁机制
    ORACLE Responsibility Menu Reference to Other User
    EBS 常用 SQL
  • 原文地址:https://www.cnblogs.com/CCCrunner/p/11781782.html
Copyright © 2011-2022 走看看