Android examples for User Interface:View Position
get View on Screen Y coordinate
//package com.java2s; import android.view.View; public class Main { public static float getScreenY(View v) { int[] loc = new int[2]; v.getLocationOnScreen(loc);//from w w w . j a va 2 s.c o m return loc[1]; } }