android studio红色下划线,如何在Android Studio中为文字加下划线?

博主正在寻找在Android Studio中为TextView的文本添加下划线的方法。他们已经尝试了设置文本样式为粗体和斜体,但未能找到添加下划线的相应选项。代码片段显示了XML布局文件中两个按钮的文字样式设置,包括颜色、权重、对齐方式等,但未包含下划线属性。

无处不在,无法找到解决方案。设置粗体或斜体非常简单,为什么设置下划线不那么简单?如何在Android Studio中为文字加下划线?

这里是我的相关代码位:

android:orientation="horizontal"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:id="@+id/forgotpasswordHolder"

android:layout_marginTop="10dp">

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="Forgot your password?"

android:id="@+id/labForgotpassword"

android:textColor="#6BB08C"

android:layout_weight="1"

android:textStyle="bold|italic"

android:layout_gravity="left"

android:paddingLeft="20dp"

android:textIsSelectable="true"

android:singleLine="false" />

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:text="Not a member?"

android:id="@+id/signup"

android:textColor="#6BB08C"

android:layout_weight="1"

android:textStyle="bold|italic"

android:singleLine="false"

android:layout_gravity="right"

android:gravity="right"

android:paddingRight="20dp"

android:textIsSelectable="true" />

我有两个“?记住密码和‘非会员’按钮,而且我喜欢它,如果我能强调文本(S )。

提前感谢!

2015-09-25

Mike K

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值