Bold words in a string of strings.xml in Android

前端 未结 9 2119
甜味超标
甜味超标 2020-12-01 02:44

I have a long text in one of the strings at strings.xml. I want to make bold and change the color of some words in that text.

How can I do it?

9条回答
  •  甜味超标
    2020-12-01 02:58

    You can do it from string

     
    
     Total Review:  
    
     
    

    and can access it from the java code like

    proDuctReviewNumber.setText(getResources().getString(R.string.total_review)+productDetailsSuccess.getProductTotalReview());
    

提交回复
热议问题