Android TextView : “Do not concatenate text displayed with setText”

前端 未结 10 1527
小鲜肉
小鲜肉 2020-12-02 04:01

I am setting text using setText() by following way.

prodNameView.setText(\"\" + name);

prodOriginalPriceView.setText(\"\" + String.format(g         


        
10条回答
  •  庸人自扰
    2020-12-02 04:39

    You can use this , it works for me

    title.setText(MessageFormat.format("{0} {1}", itemList.get(position).getOppName(), itemList.get(position).getBatchNum()));
    

提交回复
热议问题