Android examples for User Interface:Layout
get View Layout Y
//package com.java2s; import android.view.View; public class Main { public static int getLayoutY(View view) { int[] location = new int[2]; view.getLocationInWindow(location); view.getLocationOnScreen(location); return location[1]; }/* w w w .ja va 2s.com*/ }