get View Radius - Android User Interface

Android examples for User Interface:View Property

Description

get View Radius

Demo Code


//package com.java2s;
import android.view.View;

public class Main {

    static int getRadius(View view) {
        return Math.max(view.getMeasuredWidth(), view.getMeasuredHeight()) / 2;
    }/* w w  w .j a v a  2s. com*/
}

Related Tutorials