List of usage examples for android.text Layout getText
public final CharSequence getText()
From source file:com.duy.pascal.ui.editor.view.LineUtils.java
/** * @param editable - edit text//from w w w . j av a 2 s .co m * @param line - current line * @param col - column index at current line * @return the index at (line:col) */ public static int getIndexFromLineCol(Layout editable, int line, int col) { int index = editable.getLineStart(line); index += col; return Math.min(index, editable.getText().length()); }