• 怎么设置输入的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 ());
  • 相关阅读:
    我的插件架构
    .net 处理图片亮度
    封装自己的对称加密模块
    漏洞无处不在之窃取你的QQ信息
    写自己的自动升级模块
    抓到一只网马,发文顺便鄙视下360
    .net 3.5的Socket异步完成端口
    检测本机是否登录了指定QQ账号
    C++/CLR写的Data Blocks
    修改的Vista风格多功能日历Demo
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10734112.html
  • Copyright © 2020-2023  润新知