Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import android.graphics.PointF;

import android.view.View;

public class Main {
    static public void setPosition(View v, PointF p) {
        int w = v.getWidth();
        int h = v.getHeight();
        v.setLeft((int) p.x);
        v.setTop((int) p.y);
        v.setRight((int) p.x + w);
        v.setBottom((int) p.y + h);
    }
}