1. String str="adsjoiasdjpaisdjpaidj";    
2. /** Called when the activity is first created. */
3. @Override
4. public void onCreate(Bundle savedInstanceState) {
5. super.onCreate(savedInstanceState);
6. setContentView(R.layout.main);
7. TextView textview=(TextView)findViewById(R.id.textView);

8. SpannableStringBuilder style=new SpannableStringBuilder(s
tr);
9. style.setSpan(new ForegroundColorSpan(Color.RED),3,8,Spann
able.SPAN_EXCLUSIVE_EXCLUSIVE);
10. textview.setText(style);
11.}