Center TextView programmatiquement Android

yourTextView.setGravity(Gravity.CENTER);
Fedeboss