android circle button
<p>how I can to make custom  <strong>circle button</strong>? (only make clicks on circle )</p>

<p>is any way to make it with circle png file? </p>

<p>I tried with imageview override onTouch method but it works very badly because view.getWidth(), view.getHeight() and view.getTop... methods works very bad</p>

<pre><code>public boolean inCircle(MotionEvent e, int radius, int x, int y) {
    int dx = (int) (e.getX() - x);
    int dy = (int) (e.getY() - y);
    double d = Math.sqrt((dx * dx) + (dy * dy));
    if (d &lt; radius)
        return true;
    return false;
}
</code></pre>

<p>thanks</p>
