Write this single line code for set gravity on any view


view_id.setGravity(Gravity.RIGHT); view_id.setTextDirection(View.TEXT_DIRECTION_LTR);