【问题标题】:underline one word and Bold one word in Textview XML (Android Studio)Textview XML(Android Studio)中下划线一个字加粗一个字
【发布时间】:2016-11-28 22:08:02
【问题描述】:

我正在使用 Android studio text-view 写一个小段落。我需要粗体字的帮助并在该词下划线。

【问题讨论】:

标签: android xml textview


【解决方案1】:

您应该将文本放在带有 u 标签的字符串文件中,并将文本样式设置为像这样的粗体...

<string name="terms_condition_signup"><u>Please accept the Terms of Conditions</u>.</string>
<RelativeLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">

    <TextView
        android:id="@+id/loginid"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:gravity="center_vertical"
        android:text="@string/terms_condition_signup"
        android:textColor="@color/textcolor"
        android:textSize="25dp"
        android:textStyle="bold"/>
</RelativeLayout>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-07-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-01
    • 1970-01-01
    • 2017-03-10
    • 1970-01-01
    相关资源
    最近更新 更多