In my application I've implemented a num-pad of my own, which is used for entering (number-based) passcodes. The 'password', or rather the 'dot'-representation of it, is shown on 4 EditTexts implemented in 4 boxes above the num-pad. When you enter a number one of those boxes will get filled in with a dot - for this I use the TransformationMethod PasswordTransformationMethod - but I'd want the number you punch in to be visible for a short while before it gets hidden (Like ~200ms).
Is there any implementation of this readily-done in Android or how would you implement this the best way? I'm sure you know what I mean, it's used quite frequently for mobile-based password entering.
Edit: Code after tips:
codeField1 = (EditText) findViewById(R.id.passcode_1);
codeField2 = (EditText) findViewById(R.id.passcode_2);
codeField3 = (EditText) findViewById(R.id.passcode_3);
codeField4 = (EditText) findViewById(R.id.passcode_4);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
codeField1.setTransformationMethod(PasswordTransformationMethod.getInstance());
codeField2.setTransformationMethod(PasswordTransformationMethod.getInstance());
codeField3.setTransformationMethod(PasswordTransformationMethod.getInstance());
codeField4.setTransformationMethod(PasswordTransformationMethod.getInstance());
}
}, 2000);
Still giving me issues, only effect on the first one I enter.. (All this is in onCreate()).