programmatisch Android in Center textview

yourTextView.setGravity(Gravity.CENTER);
Fedeboss