【问题标题】:How to make editetext text as Italic,Underline and Highlighted in Android?如何在Android中将edittext文本设置为斜体、下划线和突出显示?
【发布时间】:2014-02-25 09:34:19
【问题描述】:

在我的应用程序中,我有一个要求,当用户输入编辑文本时,文本应变为斜体、下划线和突出显示。请帮助我。

提前致谢。

【问题讨论】:

标签: android android-edittext


【解决方案1】:
EditText txt=(EditText)findViewById(R.id.txt);

txt.setTypeface(Typeface.SANS_SERIF, Typeface.BOLD); //you can change fonts as you like

【讨论】:

    猜你喜欢
    • 2020-07-26
    • 2013-11-06
    • 2023-03-29
    • 1970-01-01
    • 2011-03-03
    • 1970-01-01
    • 2019-06-20
    • 2023-03-24
    • 1970-01-01
    相关资源
    最近更新 更多