TextView TV = (TextView)findViewById(R.id.mytextview01);
TV.setText("I know just how to whisper, And I know just how to cry,I know just where to find the answers", TV.BufferType.SPANNABLE);
Spannable WordtoSpan = (Spannable) myTextView.getText();
WordtoSpan.setSpan(new ForegroundColorSpan(Color.BLUE), 15, 30, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
TV.setText(WordtoSpan);
BitmapDrawable bd = (BitmapDrawable)imageView.getDrawable();
intent.putExtra("img", bd);
Bitmap b = (Bitmap) intent.getParcelable("img");
imageView.setImageBitmap(b);
本文介绍了如何使用Android中的TextView设置特定文本颜色,并演示了如何通过Intent传递和还原Bitmap图片的过程。
2891

被折叠的 条评论
为什么被折叠?



