I have a search strings and I need to replace search string character to different textview string with bold style .
below may code:
![First screen to load array][1]
![search string in array][2]
![replace all string textview by search string][3]
I do not want replace all string of textview because i want bold only specific character from position of different textview string.
![enter image description here][4]
I want this format replace style bold.
String strlottery=”17659″;
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);
TextView txt3 = (TextView) findViewById(R.id.textView17);
String str=strlottery.replaceAll("1", "<font size=\"16\" color=\"red\"><b>"+"1"+"</b><</font>");
Log.v("Search", str);
Spanned text = Html.fromHtml(str);
txtf.setText(text);
txtS.setText(text);
txtT.setText(text);
txt1.setText(text);
txt2.setText(text);
txt3.setText(text);
This is my search string and i want to search this string in to the arraylist then i want to bold those character when getting on the arraylist.
ArrayList string is 18758,13660,52798,16514,70679.
But this is replace all Textview String by the 17659 string with match charater bold style. 1879 search string this is replace old string but i donot want this type replace .i want only specific position character change in bold style
Following is the way to do this..define start and end of text and perform actions on part of text…..cheers!!!!!!!!