本文实例讲述了Android编程实现TextView部分颜色变动的方法。分享给大家供大家参考,具体如下:
public class StringHandleExampleActivity extends Activity { /** Called when the activity is first created. */ private TextView textView; private String tempStr = "abcd12我的中古zx9yu5!f3,,"; private StringBuffer sb; private Listlist; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); sb = new StringBuffer(); list = new ArrayList (); textView = (TextView) findViewById(R.id.textView); for (int i = 0; i
希望本文所述对大家Android程序设计有所帮助。