在xml配置文件中设置字体加粗

1、strings.xml

 

<string name="target_string">This is <b>my</b>title</string>

 

2、TextView

 

<TextView
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:layout_marginLeft="15dp"
     android:layout_marginRight="15dp"
     android:text="@string/target_string"
     android:textSize="18sp">
</TextView>

 

你可能感兴趣的:(java,xml,android)