先看图,用户名和密码框中的英文字体是不同的:(注意看)
stack overflow上看到的一个问答贴,解决方法如下:
http://stackoverflow.com/questions/3406534/password-hint-font-in-android
下面是我用的方法,经过测试OK。
Leave android:password="true"
in your xml. In Java, ALSO set the typeface and passwordMethod:
EditText password = (EditText) findViewById(R.id.register_password_text);
password.setTypeface(Typeface.DEFAULT);
password.setTransformationMethod(new PasswordTransformationMethod());