I'm pretty sure this is not EditText preference
EditTextPreference
would work. Quoting the documentation:
This EditText can be modified either programmatically via getEditText(), or through XML by setting any EditText attributes on the EditTextPreference.
So adding android:password="true"
as part of your preference XML should work.
That being said, you are certainly welcome to create your own custom DialogPreference
for this.