比如
TextView mTextView = new TextView(context);
mTextView.setPadding(left, top, right, bottom);// 通过自定义坐标来放置你的控件
或者
TextView mTextView = new TextView(context);
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)xxxx.getLayoutParams();
params.setMargins(left, top, right, bottom));// 通过自定义坐标来放置你的控件
mTextView .setLayoutParams(params);