List of usage examples for android.text Layout getLineMax
public float getLineMax(int line)
From source file:io.plaidapp.core.ui.transitions.ReflowText.java
/** * Calculate the right boundary for this run (harder than it sounds). As we're a letter ahead, * need to grab either current letter start or the end of the previous line. Also need to * consider maxLines case, which inserts ellipses at the overflow point don't include these. *//*w w w. ja v a2s. c o m*/ private int getRunRight(Layout unrestrictedLayout, Layout maxLinesLayout, int currentLine, int index, int line, boolean withinMax, boolean isMaxEllipsis, boolean isLastChar) { int runRight; if (line != currentLine || isLastChar) { if (isMaxEllipsis) { runRight = (int) maxLinesLayout.getPrimaryHorizontal(index); } else { runRight = (int) unrestrictedLayout.getLineMax(currentLine); } } else { if (withinMax) { runRight = (int) maxLinesLayout.getPrimaryHorizontal(index); } else { runRight = (int) unrestrictedLayout.getPrimaryHorizontal(index); } } return runRight; }