我正在使用 3 个不同颜色的斜体文本视图
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:orientation="horizontal" android:id="@+id/submittedBy" android:paddingTop="10dip">
<ImageView android:id="@+id/subByImg"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="left" android:layout_gravity="bottom" android:src="@drawable/submitted_by_arrow"/>
<TextView android:id="@+id/submitLabel"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="left" android:text="Submitted by" android:textStyle="italic"
android:textSize="12sp" android:textColor="@color/gray" android:paddingLeft="5dip"/>
<TextView android:id="@+id/submitName" android:textStyle="italic"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="12sp" android:textColor="@color/maroon_dark" android:paddingLeft="10dip"/>
<TextView android:id="@+id/submitByDate" android:textStyle="italic"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="left"
android:textSize="12sp" android:textColor="@color/gray" android:paddingLeft="10dip"/>
</LinearLayout>
我想知道最后一个字符没有正确显示,特别是中间显示的名称是“Dan Buckland”,并且缺少最后一个字符,看起来像“Dan Bucklano”
另请告诉我如何让 textview 斜体和粗体同时出现..
替代文本 http://www.freeimagehosting.net/uploads/953d573113.jpg http://www.freeimagehosting.net/uploads/953d573113.jpg
我有同样的问题。我通过简单地在任何需要斜体的字符串末尾添加一个空格来解决这个问题。
这可能不是最长期正确的解决方案,但它对我有用。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)