Android TextView Center alinhe o texto programaticamente

yourTextView.setGravity(Gravity.CENTER);
Fedeboss