private RelativeLayout.LayoutParams createMyLayoutParams(int x,int y,int width,int height){
  RelativeLayout.LayoutParams layoutParams=new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);
  layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
  layoutParams.addRule(RelativeLayout.ALIGN_PARENT_TOP);
  layoutParams.width=width;
  layoutParams.height=height;
  layoutParams.leftMargin=x;
  layoutParams.topMargin=y;
  return layoutParams;
}

private RelativeLayout . LayoutParams createMyLayoutParams ( int x , int y , int width , int height ) { RelativeLayout . LayoutParams layoutParams = new RelativeLayout . LayoutParams ( RelativeLayout . LayoutParams . WRAP_CONTENT , RelativeLayout . LayoutParams . WRAP_CONTENT ) ; layoutParams . addRule ( RelativeLayout . ALIGN_PARENT_LEFT ) ; layoutParams . addRule ( RelativeLayout . ALIGN_PARENT_TOP ) ; layoutParams . width = width ; layoutParams . height = height ; layoutParams . leftMargin = x ; layoutParams . topMargin = y ; return layoutParams ; }
create a layout parameter object that holds the native component ' s position .
