Android examples for User Interface:View Center
center View on Y axes
//package com.java2s; import android.support.v4.view.ViewCompat; import android.view.View; public class Main { public static float centerY(View view) { return ViewCompat.getY(view) + view.getHeight() / 2f; }// w w w .j a va 2s . c om }