Android examples for User Interface:View Position
set View Absolute Position
//package com.java2s; import android.view.View; import android.widget.FrameLayout.LayoutParams; public class Main { public static void setAbsolutePosition(View v, int x, int y) { LayoutParams lp = (LayoutParams) v.getLayoutParams(); lp.leftMargin = x;/* www . jav a 2 s . c o m*/ lp.topMargin = y; v.setLayoutParams(lp); } }