本文整理汇总了Java中android.text.Selection.SELECTION_END属性的典型用法代码示例。如果您正苦于以下问题:Java Selection.SELECTION_END属性的具体用法?Java Selection.SELECTION_END怎么用?Java Selection.SELECTION_END使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.text.Selection
的用法示例。
在下文中一共展示了Selection.SELECTION_END属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onSpanChanged
@Override
public void onSpanChanged(Spannable text, Object what, int ostart, int oend, int nstart, int nend) {
if (disabled || block) return;
if (what == Selection.SELECTION_END) {
// Selection end changed from ostart to nstart. Trigger a check.
log("onSpanChanged: selection end moved from "+ostart+" to "+nstart);
log("onSpanChanged: block is "+block);
boolean b = block;
block = true;
if (!isPopupShowing() && policy.shouldShowPopup(text, nstart)) {
showPopup(policy.getQuery(text));
}
block = b;
}
}
示例2: isNonIntermediateSelectionSpan
private boolean isNonIntermediateSelectionSpan(final Spanned text, final Object span) {
return (Selection.SELECTION_START == span || Selection.SELECTION_END == span)
&& (text.getSpanFlags(span) & Spanned.SPAN_INTERMEDIATE) == 0;
}