Android examples for User Interface:View Property
Get View bounding Rect
//package com.java2s; import android.graphics.Rect; public class Main { public static Rect boundingRect(float centerX, float centerY, float radius) { Rect rect = new Rect(); rect.left = Math.round(centerX - radius); rect.right = Math.round(centerX + radius); rect.top = Math.round(centerY - radius); rect.bottom = Math.round(centerY + radius); return rect; }/*from w w w .jav a 2 s . c om*/ }