EditText的setTransformationMethod方法能夠設置共顯示的字符類型。ide
設置內容可見orm
et.setTransformationMethod(HideReturnsTransformationMethod.getInstance());get
設置內容隱藏input
et.setTransformationMethod(PasswordTransformationMethod.getInstance());it
固然要先設置inputType爲textPassword.io