本文整理了Java中android.text.Layout.getLineBounds()
方法的一些代码示例,展示了Layout.getLineBounds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Layout.getLineBounds()
方法的具体详情如下:
包路径:android.text.Layout
类名称:Layout
方法名:getLineBounds
暂无
代码示例来源:origin: stackoverflow.com
int currentLineEndOffset = textViewLayout.getLineForOffset((int)endOffsetOfClickedText);
boolean keywordIsInMultiLine = currentLineStartOffset != currentLineEndOffset;
textViewLayout.getLineBounds(currentLineStartOffset, this.parentTextViewRect);
textViewLayout.getLineBounds(currentLineEndOffset, this.parentTextViewRect);
this.parentTextViewRect.top += parentTextViewTopAndBottomOffset;
this.parentTextViewRect.bottom += parentTextViewTopAndBottomOffset;
代码示例来源:origin: stackoverflow.com
int line = layout.getLineForVertical(y);
synchronized (sLineBounds) {
layout.getLineBounds(line, sLineBounds);
if (! sLineBounds.contains(x, y)) {
return -1;
代码示例来源:origin: stackoverflow.com
int currentLineEndOffset = textViewLayout.getLineForOffset((int)endOffsetOfClickedText);
boolean keywordIsInMultiLine = currentLineStartOffset != currentLineEndOffset;
textViewLayout.getLineBounds(currentLineStartOffset, parentTextViewRect);
textViewLayout.getLineBounds(currentLineEndOffset, parentTextViewRect);
parentTextViewRect.top += parentTextViewTopAndBottomOffset;
parentTextViewRect.bottom += parentTextViewTopAndBottomOffset;
代码示例来源:origin: mtotschnig/MyExpenses
final int lineStart = layout.getLineForOffset(spanStart);
final int lineEnd = layout.getLineForOffset(spanEnd);
layout.getLineBounds(lineStart, outRect);
if (lineEnd == lineStart) {
代码示例来源:origin: Ronak-LM/memoir
int line = layout.getLineForVertical(y);
synchronized (sLineBounds) {
layout.getLineBounds(line, sLineBounds);
if (!sLineBounds.contains(x, y)) {
return -1;
代码示例来源:origin: stackoverflow.com
int currentLineEndOffset = textViewLayout.getLineForOffset((int) endOffsetOfClickedText);
boolean keywordIsInMultiLine = currentLineStartOffset != currentLineEndOffset;
textViewLayout.getLineBounds(currentLineStartOffset, parentTextViewRect);
代码示例来源:origin: stackoverflow.com
int line = layout.getLineForVertical(y);
synchronized (sLineBounds) {
layout.getLineBounds(line, sLineBounds);
if (!sLineBounds.contains(x, y)) {
return -1;
代码示例来源:origin: crvv/android_wubi_input
layout.getLineBounds(0, lineBoundsWithoutOffset);
textView.getLineBounds(0, lineBoundsWithOffset);
final float viewportToContentHorizontalOffset = lineBoundsWithOffset.left
内容来源于网络,如有侵权,请联系作者删除!