如何合并一些可扩展对象?

我把一个可扩展对象分成3部分,做不同的操作,然后我需要合并它们

Spannable str=editText.getText();
Spannable selectionspan=new SpannableStringBuilder(str、selectionStart、selectionEnd);
Spannable endofmodifiedspan=new SpannableStringBuilder(str、selectionEnd、editText.getText().length());
Spannable beginingofmodifiedspan=new SpannableStringBuilder(str,0,selectionStart);

我怎么做?我还没有找到执行此操作所需的方法或构造函数

你可以用这个:

TextUtils.concat(span1、span2);

http://developer.android.com/reference/android/text/TextUtils.html#concat(java.lang.CharSequence…)

发表评论