zoukankan      html  css  js  c++  java
  • 怎么设置输入的EditText字母自己主动大写

    版权声明:本文为博主原创文章,未经博主同意不得转载。

    https://blog.csdn.net/t80t90s/article/details/25048917

    复于: 2013-09-06 09:06:25
    package com.gainko.helper;

    import android.text.method.ReplacementTransformationMethod;

    /**
     * @author Ivan
     * 
     */
    public class AllCapTransformationMethod extends ReplacementTransformationMethod {

    @Override
    protected char[] getOriginal() {
    char[] aa = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z' };
    return aa;
    }

    @Override
    protected char[] getReplacement() {
    char[] cc = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' };
    return cc;
    }

    }

    ///
    editext.setTransformationMethod(new AllCapTransformationMethod ());
查看全文
  • 相关阅读:
    Diffbot:开发者工具 将web内容转换成应用
    算法之道—形而之上谓之道
    css三个ppt
    SMB的NTLM认证过程与NTLM挑战的编程实现
    c++计算圆周率
    SVN总结
    struts2技术实现用户名唯一的验证处理详解
    数字常量
    二叉树的创建和遍历
    php变量的定义和作用域
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10734112.html
  • Copyright © 2011-2022 走看看