TextView Center secara terprogram Android

yourTextView.setGravity(Gravity.CENTER);
Fedeboss