Example usage for android.widget TextView getTotalPaddingBottom

List of usage examples for android.widget TextView getTotalPaddingBottom

Introduction

In this page you can find the example usage for android.widget TextView getTotalPaddingBottom.

Prototype

public int getTotalPaddingBottom() 

Source Link

Document

Returns the total bottom padding of the view, including the bottom Drawable if any, the extra space to keep more than maxLines from showing, and the vertical offset for gravity, if any.

Usage

From source file:com.juick.android.MessageMenu.java

private int getLineAtCoordinate(TextView textView2, float y) {
    y -= textView2.getTotalPaddingTop();
    // Clamp the position to inside of the view.
    y = Math.max(0.0f, y);//from www .j  av  a  2s  . c o m
    y = Math.min(textView2.getHeight() - textView2.getTotalPaddingBottom() - 1, y);
    y += textView2.getScrollY();
    return textView2.getLayout().getLineForVertical((int) y);
}