Is it possible to set typeface of hint element of EditText view without changing the typeface of the EditText itself? Thanks.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Don't know if you just need to have them be different, or if you wanted to specifically set a typeface.
If you just need to style your hint differently than your text, here's how you can do it in Java on a per-field basis
Pass the result of fromHtml() to setHint();
Did you check
android:typeface
?This works fine both for the hint and text for the EditText.
Seems that there is no way to control typeface of hint and typeface of text separately.
In case somebody still needs a solution for this:
the best way to handle this problem is to add a TextWatcher to your EditText and dynamically change the typeface when there's no input in the EditText