创建一个应用程序,其中edittext将样式跨度添加到文本的某些位置
editable.setSpan(new StyleSpan(Typeface.BOLD), start, start+replacement.length(),Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
我的问题是,如果用户添加,在删除跨文本样式之前的某些文本或空格,如何避免?
int SPAN_COMPOSING = 256;
int SPAN_EXCLUSIVE_EXCLUSIVE = 33;
int SPAN_EXCLUSIVE_INCLUSIVE = 34;
int SPAN_INCLUSIVE_EXCLUSIVE = 17;
int SPAN_INCLUSIVE_INCLUSIVE = 18;
int SPAN_INTERMEDIATE = 512;
int SPAN_MARK_MARK = 17;
int SPAN_MARK_POINT = 18;
int SPAN_PARAGRAPH = 51;
int SPAN_POINT_MARK = 33;
int SPAN_POINT_MARK_MASK = 51;
int SPAN_POINT_POINT = 34;
int SPAN_PRIORITY = 16711680;
int SPAN_PRIORITY_SHIFT = 16;
int SPAN_USER = -16777216;
int SPAN_USER_SHIFT = 24;
在我的情况下,我需要使用哪种类型?
答案 0 :(得分:-1)
您可以使用以下代码。
Excel.run(function (context) {
var workbook = context.workbook;
//workbook.load or something ?
}