how to set gravity programmatically in android code example Example: set textview gravity programmatically android labelTV.setGravity(Gravity.CENTER | Gravity.BOTTOM);