Example usage for android.graphics.drawable InsetDrawable getPadding

List of usage examples for android.graphics.drawable InsetDrawable getPadding

Introduction

In this page you can find the example usage for android.graphics.drawable InsetDrawable getPadding.

Prototype

@Override
    public boolean getPadding(Rect padding) 

Source Link

Usage

From source file:me.sweetll.tucao.widget.PasswordEntry.java

private int getTextLeft() {
    int left = 0;
    if (getBackground() instanceof InsetDrawable) {
        InsetDrawable back = (InsetDrawable) getBackground();
        Rect padding = new Rect();
        back.getPadding(padding);
        left = padding.left;// ww  w. ja v a  2s .c o m
    }
    return left;
}