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 ());
查看全文
  • 相关阅读:
    GDI绘制时钟效果,与系统时间保持同步,基于Winform
    Asp.Net Core API网关Ocelot
    Docker打包 Asp.Net Core应用,在CentOS上运行
    【C#】数据库脚本生成工具(二)
    【C#附源码】数据库文档生成工具支持(Excel+Htm)
    微信小程序初使心得【微信小程序快速入门】
    论:开发者信仰之“天下IT是一家“(Java .NET篇)
    线程池,千万注意,原来很多人都在错用
    .NET跨平台之运行与Linux上的Jexus服务器
    StackExchange.Redis 之 SortedSet 类型示例
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10734112.html
  • Copyright © 2011-2022 走看看