Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.view.View;

public class Main {
    public static int[] getViewLocation(View view) {
        int[] loc = new int[] { 0, 0 };
        view.getLocationOnScreen(loc);
        loc[0] = (loc[0] + view.getWidth());
        loc[1] = (loc[1] + view.getHeight());
        return loc;
    }
}