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

    复于: 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 ());
  • 相关阅读:
    Gym
    Gym
    Gym
    Gym
    Gym
    hdu2586 LCA带边权的Targan算法
    bryce1010专题训练——LCA
    POJ1470 LCA (Targan离线)
    bryce1010专题训练——LCT&&树链剖分
    模板——2.7 欧拉函数
  • 原文地址:https://www.cnblogs.com/yutingliuyl/p/6729054.html
Copyright © 2011-2022 走看看