I try next
LinearLayout.LayoutParams b = new LinearLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
b.gravity =Gravity.CENTER;
ivOne.setLayoutParams(b);
But this does no work, image view in the left side of layout