I need to override styles for two EditText instances. I have two issues regarding this:
1) One EditText is for entering a password but with the same typeface. If I delete password=true it works. By default typeface=sans.
<style name="customEdit" parent="@android:style/Widget.EditText">
<item name="android:password">true</item>
<item name="android:typeface">serif</item> //doesn work.
</style>
2) Both fields have hints. And I need to set the color of these hints; is it possible? I didn't find something like this: android:hintColor...
<item name="android:textColor">#acacac</item> //works for text only.
I tried two variants for password type:
Both change typeface to default automaticaly, even in the "UI Constructor".
For your second problem, this can be helpful(under the EditText tag):
android:textColorHint="#3b64a8"
In your Activity:
passwordText.setTypeface(Typeface.SERIF);
passwordText.setTransformationMethod(new PasswordTransformationMethod());
here "passwordText" is the EditText for password.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With