Code example for Rect

Methods: getPadding

    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int measuredWidth = resolveSize(50, widthMeasureSpec);
        // Get the desired height of the icon menu view (last row of items does 
        // not have a divider below) 
        Rect padding = new Rect();
        final int desiredHeight = ((int)mPaint.getTextSize()) + mVerticalPadding
                + + padding.bottom;
        // Maximum possible width and desired height 
                resolveSize(desiredHeight, heightMeasureSpec));
     * If the canvas is null, then only touch calculations are performed to pick the target 
     * candidate. 
Connect your IDE to all the code out there  Get Codota for Java