Android examples for User Interface:View Center
get View Center Y
//package com.java2s; import android.view.View; public class Main { public static float getCenterY(View view) { if (view != null) { return view.getY() + view.getHeight() / 2.0f; }/*from w w w. j a v a2 s.c om*/ return 0; } }