我是新來的android和我試圖取代粗體風格的字符在arraylist字符串中的特定字符。我在做什麼是:替換字符只從字體樣式大膽
String myName = "76492";
這是我的搜索字符串,我想搜索此字符串到ArrayList然後我想大膽的性格那些在arraylist.Arraylist
串獲得時78758,3660,56798, 6514,90679。
TextView txtf = (TextView)findViewById(R.id.textView4);
TextView txtS = (TextView) findViewById(R.id.textView5);
TextView txtT = (TextView)findViewById(R.id.textView6);
TextView txt1 = (TextView) findViewById(R.id.textView9);
TextView txt2 = (TextView) findViewById(R.id.textView13);
String str= myName.replaceAll("6", "<b>6</b>");
Spanned text = Html.fromHtml(str);
txtf.setText(text);
txtS.setText(text);
txtT.setText(text);
txt1.setText(text);
txt2.setText(text);
但是,這是由字符串匹配系統字符大膽的風格全部更換Textview
字符串。 1879年搜索字符串,這是取代舊的字符串,但我想DONOT這種類型的替代。②要在大膽的風格
究竟是什麼問題?你的'strlottery'是什麼? –