我想通过 setText() 显示一个 BOLD 文本,但我刚刚看到一个文本不是 BOLD :( 我该如何解决这个问题?
这是我的代码: String.xml :
<string name="country"><b>AMERICA-default</b></string>
我的 Java 代码:
Resources resources;
TextView tvCountry;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
Log.d("test","onCreate()-second Activity");
setContentView(R.layout.activity_second);
resources = getResources();
tvCountry = (TextView) findViewById(R.id.tvCountry);
tvCountry.setText(resources.getString(R.string.country));//its not working !Text is not bold!
//CANNOT USE : tvCountry.setText(R.string.country);
}