Code example for Layout

Methods: getLineCount

        this.layout = layout;
        this.charStart = charStart;
    public int getLineCount() { 
        return layout.getLineCount();
    public CharSequence getText() {
        return layout.getText();
    public int getLastCharPosition() { 
        return charStart + layout.getText().length();
    public String toString() {
        return String.format(
                "Column: first character at %s, last character at %s: \n %s", 
                charStart, getLastCharPosition(), layout.getText());
Connect your IDE to all the code out there  Get Codota for Java