Android examples for User Interface:View Position
get View on Screen X coordinate
//package com.java2s; import android.view.View; public class Main { public static float getScreenX(View v) { int[] loc = new int[2]; v.getLocationOnScreen(loc);/*ww w.j a va 2s .co m*/ return loc[0]; } }